This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push to GCP Artifact Registry Resuable Workflow | |
on: | |
push: | |
branches: | |
- pull_image | |
jobs: | |
pull-image-job: | |
name: Build and Push Docker Image to GCP Artifact Registry | |
runs-on: [intel-cpu, 8-cpu, ci] | |
steps: | |
- id: 'auth' | |
name: 'Authenticate with Google Cloud' | |
uses: 'google-github-actions/[email protected]' | |
with: | |
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_JSON_KEY }} | |
- id: 'setup-buildx' | |
name: 'Set up Docker Buildx' | |
uses: 'docker/[email protected]' | |
- id: 'docker-login' | |
name: 'Docker Login' | |
uses: 'docker/[email protected]' | |
with: | |
registry: us-central1-docker.pkg.dev | |
username: _json_key | |
password: ${{ secrets.GCP_SERVICE_ACCOUNT_JSON_KEY }} |