Skip to content

Update repo build

Update repo build #2

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