11---
2- name : CI🚦
2+ name : 🚦 CI
33
44on :
55 pull_request :
66 branches :
77 - ' main'
88 workflow_dispatch :
99
10+ concurrency :
11+ group : ci-${{ github.event.pull_request.number || github.ref }}
12+ cancel-in-progress : true
13+
14+ permissions :
15+ contents : read # minimal required permissions to clone repo
16+
1017jobs :
1118 setup-matrix :
1219 runs-on : ubuntu-latest
1320 outputs :
14- matrix : ${{ steps.set-matrix.outputs.matrix }}
21+ build_matrix : ${{ steps.set-build- matrix.outputs.build_matrix }}
1522 steps :
1623 - name : Source checkout
1724 uses : actions/checkout@v6
1825
1926 - name : ' Setup yq'
2027 uses : dcarbone/install-yq-action@v1.3.1
2128
22- - id : set-matrix
23- run : echo "matrix =$(yq -o json build_versions.yaml | jq -c )" >> $GITHUB_OUTPUT
29+ - id : set-build- matrix
30+ run : echo "build_matrix =$(bash matrix.sh build )" >> $GITHUB_OUTPUT
2431
25- build_test_container :
26- name : ' Build test container'
27- runs-on : ubuntu-latest
32+ build_ci_container :
33+ name : Build ${{ matrix.platform }} CI container
34+ runs-on : ${{ matrix.runner }}
2835 needs : setup-matrix
2936 strategy :
30- matrix : ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
37+ fail-fast : false
38+ matrix : ${{ fromJson(needs.setup-matrix.outputs.build_matrix) }}
3139 steps :
3240 - name : Checkout repository
3341 uses : actions/checkout@v6
3442
35- - name : Extract version number
36- id : extract_version
37- uses : actions/github-script@v9
38- with :
39- script : |
40- const agentVersion = '${{ matrix.agent_version }}';
41- const version = agentVersion.split('-')[0];
42- core.setOutput('version', version);
43-
44- - name : Build image
43+ - name : Build ${{ matrix.platform }} CI container
4544 uses : docker/build-push-action@v7
4645 with :
47- tags : ' ci/openvoxagent:${{ steps.extract_version.outputs.version }}'
46+ tags : ci/openvoxagent:${{ matrix.agent_semver }}-${{ matrix.platform }}
4847 context : .
4948 file : Containerfile
5049 push : false
50+ platforms : linux/${{ matrix.platform }}
5151 build-args : |
5252 OPENVOX_RELEASE=${{ matrix.release }}
5353 OPENVOXAGENT_VERSION=${{ matrix.agent_version }}
5454
5555 tests :
5656 needs :
57- - build_test_container
57+ - build_ci_container
5858 runs-on : ubuntu-latest
5959 name : Test suite
6060 steps :
@@ -63,11 +63,12 @@ jobs:
6363 dependabot :
6464 permissions :
6565 contents : write
66+ pull-requests : write
6667 name : ' Dependabot auto-merge'
6768 needs :
6869 - tests
6970 runs-on : ubuntu-latest
70- if : ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
71+ if : github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'
7172 steps :
7273 - name : Dependabot metadata
7374 id : metadata
7980 run : gh pr merge --auto --merge "$PR_URL"
8081 env :
8182 PR_URL : ${{github.event.pull_request.html_url}}
82- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
83+ GH_TOKEN : ${{secrets.GITHUB_TOKEN}}
0 commit comments