File tree 2 files changed +66
-0
lines changed
2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build agent-v3 image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ agent-v3
7
+
8
+ defaults :
9
+ run :
10
+ shell : bash
11
+
12
+ permissions :
13
+ contents : read
14
+
15
+ jobs :
16
+ build :
17
+ permissions :
18
+ contents : read # for docker/build-push-action to read repo content
19
+ id-token : write # for login to GCP
20
+ runs-on : ubuntu-24.04
21
+ steps :
22
+ - name : Checkout Repository
23
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24
+
25
+ - name : Authenticate to Google Cloud
26
+ id : auth
27
+ uses : google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
28
+ with :
29
+ token_format : access_token
30
+ workload_identity_provider : ${{ secrets.GCR_WORKLOAD_IDENTITY }}
31
+ service_account : ${{ secrets.GCR_SERVICE_ACCOUNT }}
32
+
33
+ - name : Login to GCR
34
+ uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
35
+ with :
36
+ registry : gcr.io
37
+ username : oauth2accesstoken
38
+ password : ${{ steps.auth.outputs.access_token }}
39
+
40
+ - name : Setup plus credentials
41
+ run : |
42
+ printf '%s\n' "${CERT}" > nginx-repo.crt
43
+ printf '%s\n' "${KEY}" > nginx-repo.key
44
+ env :
45
+ CERT : ${{ secrets.NGINX_CRT }}
46
+ KEY : ${{ secrets.NGINX_KEY }}
47
+
48
+ - name : Build Image
49
+ run : |
50
+ docker build -f build/Dockerfile-plus -t ${REGISTRY}/${PREFIX}:${TAG} .
51
+ env :
52
+ REGISTRY : gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev
53
+ PREFIX : pdabel
54
+ TAG : plus
55
+ - name : Push image
56
+ run :
57
+ docker push ${REGISTRY}/${PREFIX}:${TAG}
58
+ env :
59
+ REGISTRY : gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev
60
+ PREFIX : pdabel
61
+ TAG : plus
Original file line number Diff line number Diff line change
1
+ # syntax=docker/dockerfile:1.6
2
+ FROM alpine:3.21
3
+
4
+ COPY nginx-repo.crt /
5
+ COPY nginx-repo.key /
You can’t perform that action at this time.
0 commit comments