Skip to content

Commit 99d26c4

Browse files
committed
ci: publish amd64 explorer image to GCR
1 parent fe60b88 commit 99d26c4

2 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ concurrency:
2828
cancel-in-progress: true
2929

3030
env:
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

3336
jobs:
3437
test-build-publish:
@@ -37,7 +40,7 @@ jobs:
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
@@ -94,7 +106,7 @@ jobs:
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

docker-compose.qbit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
start_period: 10s
3232

3333
explorer:
34-
image: ghcr.io/luxorlabs/luxor-qbit-explorer:latest
34+
image: gcr.io/analog-stage-198105/luxor-qbit-explorer:latest
3535
build:
3636
context: .
3737
dockerfile: Dockerfile

0 commit comments

Comments
 (0)