Skip to content

Commit

Permalink
Generate version matrix dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
kpk47 committed Sep 3, 2022
1 parent ca0e5a4 commit 82db5e3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@ on:
- cron: '14 3 * * *'

jobs:
build_version_matrix:
runs-on: ubuntu-latest
steps:
- id: gh-api
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
run: |
ghResults=$(gh api -H "Accept: application/vnd.github+json" /repos/"$REPO"/releases | jq -c '[.[] | ."tag_name"]')
echo "$ghResults"
echo "::set-output name=versions::$ghResults"
outputs:
versions: ${{ steps.gh-api.outputs.versions }}
installer_test:
needs: [ build_version_matrix ]
runs-on: ubuntu-latest
strategy:
matrix:
verifier-version: [v0.0.1, v1.0.0, v1.0.1, v1.0.2, v1.0.3, v1.1.0, v1.1.1, v1.2.0, v1.3.0, latest]
verifier-version: ${{ fromJson(needs.build_version_matrix.outputs.versions) }}
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand Down

0 comments on commit 82db5e3

Please sign in to comment.