Skip to content

fix: avoid confusion if setup-auth is already ran before #97

fix: avoid confusion if setup-auth is already ran before

fix: avoid confusion if setup-auth is already ran before #97

name: publish-docker
on: pull_request
jobs:
publish-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.GCE_NEW_TEST_JSON }}
project_id: gynzy-test-project
# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- run: |-
gcloud auth configure-docker europe-docker.pkg.dev
# Build the Docker image
- name: Build
run: |-
docker build \
--tag "europe-docker.pkg.dev/gynzy-test-project/public-images/helm-action:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}" .
# Push the Docker image to Google Container Registry
- name: Publish
run: |-
docker push "europe-docker.pkg.dev/gynzy-test-project/public-images/helm-action:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}"