Skip to content

Commit

Permalink
FIx workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Irori235 committed Nov 1, 2023
1 parent 73ffd74 commit 52a4ddb
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build docker image and push to Artifact Registry
on:
push:
branches:
- master
- main
workflow_dispatch:

jobs:
Expand All @@ -24,20 +24,21 @@ jobs:
access_token_lifetime: 300
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GCR
- name: Login to GAR
uses: docker/login-action@v3
with:
registry: gcr.io
registry: asia-northeast1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Create Tag
id: create-tag
- name: Create Tag SHA
id: create-tag-sha
run: |
echo 'tag=asia-northeast1-docker.pkg.dev/irori-gcloud/irori-dev/portfolio:latest' >> $GITHUB_OUTPUT
echo ${{ github.sha }} | cut -c 1-7 | awk '{print "sha="$0}' >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ steps.create-tag.outputs.tag }}
asia-northeast1-docker.pkg.dev/irori-gcloud/irori-dev/sample-sanbox:${{ steps.create-tag-sha.outputs.sha }}
asia-northeast1-docker.pkg.dev/irori-gcloud/irori-dev/sample-sanbox:latest

1 comment on commit 52a4ddb

@vercel
Copy link

@vercel vercel bot commented on 52a4ddb Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.