File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed
Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker Publish
2+
3+ on :
4+ push :
5+ branches : [ github-actions ]
6+ tags : [ 'v*' ]
7+
8+ env :
9+ GCP_ARTIFACT_HOST : ${{ vars.SHARED_WIF_LOCATON }}-docker.pkg.dev
10+ GCP_REGISTRY : ${{ vars.SHARED_WIF_LOCATON }}-docker.pkg.dev/${{ vars.SHARED_WIF_PROJECT }}/${{ vars.SHARED_WIF_REPO }}
11+ IMAGE_NAME : portal-public-api-docs
12+
13+ jobs :
14+ docker-publish :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ id-token : write
18+ contents : read
19+ steps :
20+ - name : Checkout
21+ uses : actions/checkout@v4
22+
23+ - name : Google Auth
24+ id : ' auth'
25+ uses : ' google-github-actions/auth@v2'
26+ with :
27+ workload_identity_provider : " ${{ vars.SHARED_WIF_PROVIDER }}"
28+ service_account : " ${{ vars.SHARED_WIF_SERVICE_ACCOUNT }}"
29+ token_format : ' access_token'
30+
31+ - name : Docker Login
32+ uses : ' docker/login-action@v3'
33+ with :
34+ registry : ${{ env.GCP_ARTIFACT_HOST }}
35+ username : ' oauth2accesstoken'
36+ password : ${{ steps.auth.outputs.access_token }}
37+
38+ - name : Docker Buildx Setup
39+ uses : docker/setup-buildx-action@v3
40+
41+ - name : Docker Metadata
42+ id : meta
43+ uses : docker/metadata-action@v5
44+ with :
45+ images : ${{ env.GCP_REGISTRY }}/${{ env.IMAGE_NAME }}
46+ tags : |
47+ type=raw,value=v-latest
48+ type=ref,event=tag
49+ type=sha
50+ flavor : |
51+ latest=false
52+
53+ - name : Docker Build
54+ uses : docker/bake-action@v6
55+ with :
56+ source : .
57+ files : |
58+ ./docker-bake.hcl
59+ ${{ steps.meta.outputs.bake-file }}
60+ push : false
You can’t perform that action at this time.
0 commit comments