File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 1+ name : nightly
2+ on :
3+ schedule :
4+ - cron : ' 0 0 * * *'
5+ workflow_dispatch :
6+
7+ env :
8+ CONTROLLER : ${{ github.event.repository.name }}
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : Setup QEMU
16+ uses : docker/setup-qemu-action@v1
17+ with :
18+ platforms : all
19+ - name : Setup Docker Buildx
20+ id : buildx
21+ uses : docker/setup-buildx-action@v1
22+ with :
23+ buildkitd-flags : " --debug"
24+ - name : Build multi-arch container image
25+ uses : docker/build-push-action@v2
26+ with :
27+ push : false
28+ builder : ${{ steps.buildx.outputs.name }}
29+ context : .
30+ file : ./Dockerfile
31+ platforms : linux/amd64,linux/arm/v7,linux/arm64
32+ tags : |
33+ fluxcd/${{ env.CONTROLLER }}:nightly
Original file line number Diff line number Diff line change 33 push :
44 tags :
55 - ' v*'
6+ workflow_dispatch :
7+ inputs :
8+ tag :
9+ description : ' image tag prefix'
10+ default : ' rc'
11+ required : true
612
713env :
814 CONTROLLER : ${{ github.event.repository.name }}
1723 - name : Prepare
1824 id : prep
1925 run : |
20- VERSION=sha -${GITHUB_SHA::8}
26+ VERSION="${{ github.event.inputs.tag }} -${GITHUB_SHA::8}"
2127 if [[ $GITHUB_REF == refs/tags/* ]]; then
2228 VERSION=${GITHUB_REF/refs\/tags\//}
2329 fi
@@ -68,11 +74,13 @@ jobs:
6874 docker pull docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
6975 docker pull ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
7076 - name : Generate release manifests
77+ if : startsWith(github.ref, 'refs/tags/v')
7178 run : |
7279 mkdir -p config/release
7380 kustomize build ./config/crd > ./config/release/${{ env.CONTROLLER }}.crds.yaml
7481 kustomize build ./config/manager > ./config/release/${{ env.CONTROLLER }}.deployment.yaml
7582 - name : Create release
83+ if : startsWith(github.ref, 'refs/tags/v')
7684 uses : ncipollo/release-action@v1
7785 with :
7886 prerelease : true
You can’t perform that action at this time.
0 commit comments