Skip to content

Commit 93050c4

Browse files
Update deploy-builder-api.yml
1 parent 6b023ae commit 93050c4

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

.github/workflows/deploy-builder-api.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,24 @@ jobs:
7979
# BEGIN - Docker auth and build
8080
#
8181
# If you already have a container image, you can omit these steps.
82-
- name: 'Docker Auth'
83-
uses: 'docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567' # docker/login-action@v3
84-
with:
85-
username: 'oauth2accesstoken'
86-
password: '${{ steps.auth.outputs.auth_token }}'
87-
registry: '${{ env.REGION }}-docker.pkg.dev'
82+
# - name: 'Docker Auth'
83+
# uses: 'docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567' # docker/login-action@v3
84+
# with:
85+
# username: 'oauth2accesstoken'
86+
# password: '${{ steps.auth.outputs.auth_token }}'
87+
# registry: '${{ env.REGION }}-docker.pkg.dev'
88+
89+
# Verify repository access
90+
- name: 'Verify Repository Access'
91+
run: |
92+
gcloud artifacts repositories list --location=${{ env.REGION }}
93+
gcloud artifacts repositories describe ${{ env.REPOSITORY }} --location=${{ env.REGION }}
8894
95+
# Configure Docker to use gcloud as a credential helper
96+
- name: 'Configure Docker'
97+
run: |
98+
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev
99+
89100
# Download Java version
90101
- name: Set up Java 21
91102
uses: actions/setup-java@v3
@@ -102,7 +113,7 @@ jobs:
102113
- name: 'Build and Push Container'
103114
working-directory: builder-api
104115
run: |-
105-
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/cloud-run-source-deploy/${{ env.API_NAME }}:latest"
116+
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.API_NAME }}:latest"
106117
docker build -f src/main/docker/Dockerfile.jvm --tag "${DOCKER_TAG}" .
107118
docker push "${DOCKER_TAG}"
108119
@@ -116,7 +127,7 @@ jobs:
116127
region: '${{ env.REGION }}'
117128
# NOTE: If using a pre-built image, update the image name below:
118129

119-
image: '${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/cloud-run-source-deploy/${{ env.API_NAME }}:latest'
130+
image: '${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.API_NAME }}:latest'
120131
# If required, use the Cloud Run URL output in later steps
121132
- name: 'Show output'
122133
run: |2-

0 commit comments

Comments
 (0)