Skip to content

fix repo location

fix repo location #237

Workflow file for this run

name: Push to Artifact Registry
on:
push:
branches:
- "main"
- "releases/**"
tags:
- "*"
workflow_dispatch: {}
env:
IMAGE_NAME: "wallet"
AR_REPO_LOCATION: "europe-west1-docker.pkg.dev"
AR_URL: "hyli-shared-all/apps"
jobs:
build_and_push:
permissions:
contents: "read"
id-token: "write"
packages: "write"
runs-on: ubuntu-latest
strategy:
matrix:
suffix:
- server
- ui
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.AR_REPO_LOCATION }}/${{ env.AR_URL }}/${{ env.IMAGE_NAME }}-${{ matrix.suffix }}
ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }}-${{ matrix.suffix }}
tags: |
type=sha
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: "projects/493106494045/locations/global/workloadIdentityPools/hyli-all-pool/providers/hyli-github-provider"
service_account: "[email protected]"
- name: "Authenticate docker on gcp"
run: |
gcloud auth configure-docker ${{ env.AR_REPO_LOCATION }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
context: .
file: Dockerfile.${{ matrix.suffix }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}