forked from cert-manager/webhook-example
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.16 KB
/
push.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
32
33
34
35
36
37
38
39
40
name: Build
on:
push:
branches:
- 'master'
pull_request:
env:
DOCKER_IMAGE_PATH: us-docker.pkg.dev/cubejs-cloud/cloud/cloud-dns-solver
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
name: Builder
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate with Google Cloud
run: echo "${{ secrets.GCP_SERVICE_ACCOUNT_KEY_JSON }}" > /tmp/gcp_key.json && gcloud auth activate-service-account --key-file=/tmp/gcp_key.json
env:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
- name: Configure Docker to use gcloud as a credential helper
run: gcloud auth configure-docker us-docker.pkg.dev
env:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
# - name: Login to Artifact Registry
# uses: docker/login-action@v3
# with:
# registry: us-docker.pkg.dev
# username: _json_key_base64
# password: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY_JSON }}
- name: Build docker image
run: |
docker build -t $DOCKER_IMAGE_PATH:latest .
- name: Push docker Image
run: |
docker push $DOCKER_IMAGE_PATH:latest