Skip to content

Commit

Permalink
chore: create gar-publish-dev.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
sokovninn authored Apr 29, 2024
1 parent c6ac8e0 commit 4b62b86
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/gar-publish-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Reference: https://gist.github.com/joeyslalom/3a3b4783ea9f2e7fa3493c13bcf68e0a

name: Deploy dev image to GAR (Google Artifact Registry)

on:
workflow_dispatch:
env:
PROJECT_ID: easyml-394818
GAR_LOCATION: us-central1

jobs:
push-store:
name: Push the image to GAR
runs-on: ubuntu-latest

steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main

- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/[email protected]'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
token_format: 'access_token'

- uses: 'docker/login-action@v1'
name: 'Docker login'
with:
registry: '${{ env.GAR_LOCATION }}-docker.pkg.dev'
username: 'oauth2accesstoken'
password: '${{ steps.auth.outputs.access_token }}'

- name: 'Build Inventory Image'
working-directory: .
run: |
docker build --build-arg GITHUB_TOKEN=${{secrets.GHCR_PAT}} . --tag dev
docker push $GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/internal/datadreamer --all-tags

0 comments on commit 4b62b86

Please sign in to comment.