forked from aatarasoff/linkerd-easyauth
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.15 KB
/
publish-webhook.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
name: Publish Docker image
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
push_to_registries:
name: Push Docker image to GCP Artifact Registry
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Google Artifact Registry
uses: docker/login-action@v3
with:
registry: europe-docker.pkg.dev
username: _json_key
password: ${{ secrets.GCP_ARTIFACT_REGISTRY_KEY }}
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Extract Git tag
id: tag
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
file: injector/Dockerfile
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: |
europe-docker.pkg.dev/anna-infra/linkerd-easyauth/linkerd-easyauth-webhook:${{ env.TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max