Skip to content

Commit 75f323c

Browse files
s
1 parent 5575b8b commit 75f323c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/scratch-workflow.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Scratch Workflow
22

3+
env:
4+
GAR_LOCATION: us-west1
5+
36
on:
47
push:
58
branches: [bkellam/release_cleanup]
69
workflow_dispatch:
710

8-
env:
9-
GAR_LOCATION: us-west1
10-
1111
jobs:
1212
scratch:
1313
runs-on: ubuntu-latest
@@ -17,17 +17,14 @@ jobs:
1717
# Requird for OIDC auth with GCP.
1818
# @see: https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
1919
id-token: 'write'
20+
env:
21+
IMAGE_PATH: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/sourcebot-staging/sourcebot
2022
steps:
2123
- name: 'Checkout'
2224
uses: 'actions/checkout@v3'
2325
with:
2426
submodules: "true"
2527

26-
- name: Print environment variable
27-
env:
28-
NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT: ${{ vars.NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT }}
29-
run: echo $NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT
30-
3128
# @see: https://github.com/google-github-actions/auth?tab=readme-ov-file#direct-wif
3229
- name: 'Google auth'
3330
id: 'auth'
@@ -51,7 +48,9 @@ jobs:
5148
with:
5249
context: .
5350
push: true
54-
tags: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/sourcebot-staging/sourcebot:${{ github.sha }}
51+
tags: |
52+
${{ env.IMAGE_PATH }}:${{ github.sha }}
53+
${{ env.IMAGE_PATH }}:latest
5554
build-args: |
5655
NEXT_PUBLIC_SOURCEBOT_VERSION=${{ github.ref_name }}
5756
NEXT_PUBLIC_POSTHOG_PAPIK=${{ vars.NEXT_PUBLIC_POSTHOG_PAPIK }}

0 commit comments

Comments
 (0)