-
Notifications
You must be signed in to change notification settings - Fork 6
29 lines (23 loc) · 1.36 KB
/
deps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
name: Check Dependency (not covered by Dependabot)
on:
schedule:
- cron: '0 4 * * *'
jobs:
check-is-latest:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
name: Checkout code
- name: Check RedHat UBI8 Minimal Container Version
run: |
CURRENT=$(grep --only-matching --no-filename 'ubi-minimal:[0-9][0-9.-]*' -R . | uniq | cut -d':' -f2)
LATEST=$(curl --silent 'https://catalog.redhat.com/api/containers/v1/repositories/registry/registry.access.redhat.com/repository/ubi8-minimal/images?page_size=500&page=0&exclude=data.repositories.comparison,data.brew,data.cpe_ids,data.top_layer_id' | jq -r '[ .data[] | select(.architecture == "amd64") | select(.repositories[].tags[].name == "latest") | .repositories[].tags[].name | select(contains("latest") | not) ] | unique | sort_by(length) | reverse | .[0]')
echo "test: ${CURRENT} = ${LATEST}"
test ${CURRENT} = ${LATEST}
- name: Check if latest (stable) Go release is used
run: |
CURRENT=$(grep --perl-regexp --only-matching --no-filename '/dl/go[0-9.]+.linux-amd64.tar.gz' . -R)
LATEST=$(curl --silent 'https://go.dev/dl/' | grep --perl-regexp --only-matching '(?<=href=")/dl/go[0-9.]+.linux-amd64.tar.gz(?=")' | head -n 1)
echo "test: ${CURRENT} = ${LATEST}"
test ${CURRENT} = ${LATEST}