-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (25 loc) · 1.01 KB
/
publish-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: publish-docker
on: pull_request
jobs:
publish-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# 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 }}"