Skip to content

Commit

Permalink
Merge pull request #145 from wikimedia/dynamic-matrix
Browse files Browse the repository at this point in the history
CI: Dynamically determine versions to build
  • Loading branch information
christian-heusel authored Aug 19, 2024
2 parents 3427c00 + 51698df commit 5d89927
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,31 @@ on:
pull_request:
push:

defaults:
run:
shell: bash

jobs:
lookup-versions:
runs-on: ubuntu-latest

outputs:
versions: ${{ steps.versions.outputs.versions }}
steps:
- uses: actions/checkout@v4
- name: Get current versions
id: versions
run: |
echo "versions=$(python -c 'import glob, json; print(json.dumps(glob.glob("1.*")))')" | tee $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest

needs:
- lookup-versions
strategy:
matrix:
version: ['1.39', '1.41', '1.42']
version: ${{ fromJson(needs.lookup-versions.outputs.versions) }}
type: [apache, fpm, fpm-alpine]

steps:
Expand Down

0 comments on commit 5d89927

Please sign in to comment.