forked from etheralpha/clientdiversity-org
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.46 KB
/
publish-tag.yaml
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
41
42
43
44
45
46
47
name: Publish Docker tag images
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
DOCKER_REGISTRY: europe-docker.pkg.dev
DOCKER_IMAGE_NAME: lks-lz-artifacts/docker-network-clientdiversity-website/frontend
jobs:
build-docker:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ inputs.sha }}
uses: actions/checkout@v2
- name: Setup buildx
uses: docker/setup-buildx-action@v2
- name: Authenticate to Google Cloud
id: gcpauth
uses: google-github-actions/auth@v1
with:
create_credentials_file: "true"
workload_identity_provider: "projects/311968610280/locations/global/workloadIdentityPools/github/providers/github"
service_account: "[email protected]"
- name: login
run: |-
gcloud auth login --brief --cred-file="${{ steps.gcpauth.outputs.credentials_file_path }}"
gcloud auth configure-docker ${{ env.DOCKER_REGISTRY }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
build-args: |
GIT_TAG=${{ github.ref_name }}
tags: |
${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}
${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:latest