Skip to content

fix(ci): exchange suffix for image tags #22

fix(ci): exchange suffix for image tags

fix(ci): exchange suffix for image tags #22

Workflow file for this run

name: Create and publish Docker image
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on:
push:
branches:
- '**'
pull_request:
jobs:
metadata:
runs-on: ubuntu-latest
steps:
- name: Extract metadata for Docker
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=edge
type=semver,pattern={{version}}
type=raw,value=canary,enable=${{ contains(github.event.head_commit.message, 'build_image') }}
# - name: get-npm-version
# id: package-version
# uses: martinbeentjes/[email protected]
build-prod-image:
if: ${{ github.event.pull_request.merged }}
uses: ./.github/workflows/build-docker-image.yaml
needs: [metadata]
with:
platforms: linux/amd64
docker_file: prod.Dockerfile
image_tags: ${{ needs.metadata.outputs.tags }}
image_labels: ${{ needs.metadata.outputs.labels }}
push: true
build-canary-image:
if: ${{ contains(github.event.head_commit.message, 'build_image') }}
uses: ./.github/workflows/build-docker-image.yaml
needs: [metadata]
with:
platforms: linux/amd64
docker_file: Dockerfile
image_tags: ${{ needs.metadata.outputs.tags }}
image_labels: ${{ needs.metadata.outputs.labels }}
push: true
build-edge-image:
uses: ./.github/workflows/build-docker-image.yaml
needs: [metadata]
with:
platforms: linux/amd64
docker_file: Dockerfile
image_tags: ${{ needs.metadata.outputs.tags }}
image_labels: ${{ needs.metadata.outputs.labels }}
push: true