Commit e779f34 1 parent a2fe6f9 commit e779f34 Copy full SHA for e779f34
File tree 1 file changed +45
-0
lines changed
1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Publish Zarf Agent Image
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ versionTag :
7
+ description : " Version tag"
8
+ required : true
9
+ branchName :
10
+ description : " Branch to build the agent from"
11
+ required : false
12
+ default : " master"
13
+
14
+ jobs :
15
+ build-injector :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - name : " Checkout Repo"
19
+ uses : actions/checkout@v2
20
+ with :
21
+ ref : ${{ github.event.inputs.branchName }}
22
+
23
+ - name : " Install cosign"
24
+ uses : sigstore/cosign-installer@v2.1.0
25
+
26
+ - name : Set up Docker Buildx
27
+ id : buildx
28
+ uses : docker/setup-buildx-action@v2
29
+
30
+ - name : Login to Docker Hub
31
+ uses : docker/login-action@v1
32
+ with :
33
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
34
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
35
+
36
+ - name : " Build and Publish the Image"
37
+ run : buildx build --push --platform linux/arm64/v8,linux/amd64 --tag defenseunicorns/zarf-agent:${{ github.event.inputs.versionTag }} .
38
+
39
+ - name : " Sign the Image"
40
+ run : cosign sign --key awskms:///${{ secrets.COSIGN_AWS_KMS_KEY }} -a release-engineer=https://github.com/${{ github.actor }} -a version=${{ github.event.inputs.versionTag }} defenseunicorns/zarf-agent:${{ github.event.inputs.versionTag }}
41
+ env :
42
+ COSIGN_EXPERIMENTAL : 1
43
+ AWS_REGION : ${{ secrets.COSIGN_AWS_REGION }}
44
+ AWS_ACCESS_KEY_ID : ${{ secrets.COSIGN_AWS_KEY_ID }}
45
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.COSIGN_AWS_ACCESS_KEY }}
You can’t perform that action at this time.
0 commit comments