@@ -28,7 +28,10 @@ concurrency:
2828 cancel-in-progress : true
2929
3030env :
31- IMAGE_NAME : ghcr.io/luxorlabs/luxor-qbit-explorer
31+ CI_GCP_PROJECT_ID : ${{ secrets.CI_GCP_PROJECT_ID }}
32+ CI_GCP_SERVICE_ACCOUNT : ${{ secrets.CI_GCP_SERVICE_ACCOUNT }}
33+ CI_GCP_WORKLOAD_IDENTITY_PROVIDER : ${{ secrets.CI_GCP_WORKLOAD_IDENTITY_PROVIDER }}
34+ IMAGE_NAME : gcr.io/analog-stage-198105/luxor-qbit-explorer
3235
3336jobs :
3437 test-build-publish :
3740 timeout-minutes : 30
3841 permissions :
3942 contents : read
40- packages : write
43+ id-token : write
4144
4245 steps :
4346 - name : Repository checkout
@@ -61,13 +64,22 @@ jobs:
6164 - name : Set up Docker Buildx
6265 uses : docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
6366
64- - name : Login to GitHub Container Registry
67+ - name : Authenticate to GCP
68+ id : auth
69+ if : github.event_name != 'pull_request'
70+ uses : google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
71+ with :
72+ token_format : access_token
73+ workload_identity_provider : ${{ env.CI_GCP_WORKLOAD_IDENTITY_PROVIDER }}
74+ service_account : ${{ env.CI_GCP_SERVICE_ACCOUNT }}
75+
76+ - name : Login to GCR
6577 if : github.event_name != 'pull_request'
6678 uses : docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
6779 with :
68- registry : ghcr .io
69- username : ${{ github.actor }}
70- password : ${{ secrets.GITHUB_TOKEN }}
80+ registry : gcr .io
81+ username : oauth2accesstoken
82+ password : ${{ steps.auth.outputs.access_token }}
7183
7284 - name : Generate image metadata
7385 id : meta
94106 with :
95107 context : .
96108 file : Dockerfile
97- platforms : linux/amd64,linux/arm64
109+ platforms : linux/amd64
98110 push : ${{ github.event_name != 'pull_request' }}
99111 tags : ${{ steps.meta.outputs.tags }}
100112 cache-from : type=gha
0 commit comments