Add workflow to validate versions.json and test deprecated tags #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test deprecated versions latest tags | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- versions.json | |
- .github/workflows/test-deprecated-tags.yml | |
jobs: | |
get_deprecated_tags: | |
name: Get deprecated version latest tags | |
runs-on: ubuntu-latest | |
outputs: | |
deprecatedVersionLatestTags: ${{ steps.tags.outputs.latestTags }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: parse versions.json | |
id: tags | |
run: | | |
deprecatedLatestTags=$(jq -c "[.deprecations | to_entries | .[].value.latestTag]" versions.json) | |
echo "latestTags=$deprecatedLatestTags" >> $GITHUB_OUTPUT | |
echo "latestTags=$deprecatedLatestTags" | |
test_docker_pull: | |
name: Test via docker pull | |
runs-on: ubuntu-latest | |
needs: get_deprecated_tags | |
strategy: | |
matrix: | |
latestTag: ${{ fromJSON(needs.get_deprecated_tags.outputs.deprecatedVersionLatestTags) }} | |
steps: | |
- name: Log Inputs | |
run: | | |
echo "Deprecated Version Latest Tag: ${{ matrix.latestTag }}" | |
- name: Attempt Docker Pull | |
run: | | |
docker pull octopusdeploy/kubernetes-agent-tools-base:${{matrix.latestTag}} |