-
Notifications
You must be signed in to change notification settings - Fork 56
63 lines (55 loc) · 1.51 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
inputs:
TRIAL_BRANCH:
type: string
required: false
default: ''
description: 'Branch that contains manifest and patches. Default is empty which uses GITHUB_SHA'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read # to fetch code
actions: write # to cancel previous workflows
packages: write # to upload container
jobs:
metadata:
runs-on: ubuntu-22.04
outputs:
TRIAL_BRANCH: ${{ steps.meta.outputs.TRIAL_BRANCH }}
steps:
- name: Set optional trial branch
id: meta
shell: bash -x -e {0}
run: |
if [[ -z "${{ inputs. TRIAL_BRANCH}}" ]]; then
echo "TRIAL_BRANCH=${{ github.sha }}"
else
echo "TRIAL_BRANCH=${TRIAL_BRANCH}"
fi | tee $GITHUB_OUTPUT
amd64:
needs: metadata
uses: ./.github/workflows/_ci.yaml
with:
ARCHITECTURE: amd64
TRIAL_BRANCH: ${{ needs.metadata.outputs.TRIAL_BRANCH }}
secrets: inherit
arm64:
needs: metadata
uses: ./.github/workflows/_ci.yaml
with:
ARCHITECTURE: arm64
TRIAL_BRANCH: ${{ needs.metadata.outputs.TRIAL_BRANCH }}
secrets: inherit
finalize:
needs: [amd64, arm64]
if: "!cancelled()"
uses: ./.github/workflows/_finalize.yaml
with:
PUBLISH_BADGE: false
secrets: inherit