Skip to content

Check Dependency (not covered by Dependabot) #374

Check Dependency (not covered by Dependabot)

Check Dependency (not covered by Dependabot) #374

Workflow file for this run

---
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}