fix: prefix default and deadletter outputs w/ system+env prefix also … #286
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Container Image | |
on: | |
push: | |
branches: | |
- main | |
env: | |
GH_REGISTRY: ghcr.io | |
GCP_REGISTRY: us-east1-docker.pkg.dev | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Get Version from file | |
id: get-version | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: ./.VERSION | |
- name: Login To Github Docker Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ env.GH_REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up build cache | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.build-cache | |
key: ${{ runner.os }}-build-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-build- | |
- name: Set up Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./deploy/Dockerfile | |
builder: ${{ steps.buildx.outputs.name }} | |
platforms: linux/amd64, linux/arm64 | |
push: true | |
cache-from: type=local,src=/tmp/.build-cache | |
cache-to: type=local,dest=/tmp/.build-cache | |
tags: | | |
${{ env.GH_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.get-version.outputs.content }} | |
labels: ${{ steps.meta.outputs.labels }} |