exporting access_token and removing unnecessary setup-gcloud #7
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: dockerbuild | |
on: | |
push: | |
branches: | |
- 'master' | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- id: auth | |
name: Authenticate with google SA | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}' | |
token_format: 'access_token' | |
- name: Login to Artifact Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: us-docker.pkg.dev | |
username: oauth2accesstoken | |
password: ${{ steps.auth.outputs.access_token }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: us-docker.pkg.dev/mythical-games/saga/smtp-blackhole:latest | |