Stewart Biology South Patch 1 #21
Workflow file for this run
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 docker image | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- dev | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up dev (edge) image metadata | |
id: meta-dev | |
uses: docker/metadata-action@v5 | |
if: ${{ github.event_name != 'release' }} | |
with: | |
images: ghcr.io/idoneam/Canary | |
flavor: | | |
latest=false | |
tags: | | |
type=raw,value=dev,enable={{is_default_branch}} | |
type=sha,prefix=sha- | |
- name: Set up release image metadata | |
id: meta-release | |
uses: docker/metadata-action@v5 | |
if: ${{ github.event_name == 'release' }} | |
with: | |
images: ghcr.io/idoneam/Canary | |
flavor: | | |
latest=true | |
tags: | | |
type=semver,pattern={{major}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{version}} | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push dev (edge) image | |
uses: docker/build-push-action@v6 | |
if: ${{ github.event_name != 'release' }} | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta-dev.outputs.tags }} | |
- uses: docker/build-push-action@v6 | |
if: ${{ github.event_name == 'release' }} | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta-release.outputs.tags }} |