-
Notifications
You must be signed in to change notification settings - Fork 306
32 lines (27 loc) · 960 Bytes
/
docker-deploy.yaml
File metadata and controls
32 lines (27 loc) · 960 Bytes
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
name: Push docker image to Google Artifact Registry
on:
workflow_dispatch:
push:
tags:
- 'v*'
permissions:
contents: read
id-token: write
jobs:
setup-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: 'projects/${{ secrets.GCP_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github-pool/providers/github-provider'
service_account: '${{ secrets.SERVICE_ACCOUNT }}'
project_id: '${{ secrets.GCP_PROJECT_ID }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
- name: 'Build and Push'
run: |-
docker build -t us-east4-docker.pkg.dev/cloudci-copybara/copybara/copybara-cli:latest .
docker push us-east4-docker.pkg.dev/cloudci-copybara/copybara/copybara-cli:latest