Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ name: Docker Build and Publish

on:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
branches: ["main"]
workflow_call:
inputs:
version:
description: "Semver tag to publish, e.g. v1.2.3. Empty falls back to the git ref."
type: string
required: false
default: ""
workflow_dispatch:

env:
Expand Down Expand Up @@ -55,8 +61,8 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}},value=${{ inputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
Comment thread
Majorfi marked this conversation as resolved.
type=sha,format=short

- name: Build and push Docker image
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ permissions:
jobs:
create-tag:
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.create_tag.outputs.new_tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -48,6 +50,13 @@ jobs:
git tag ${{ steps.create_tag.outputs.new_tag }}
git push origin ${{ steps.create_tag.outputs.new_tag }}

docker:
needs: create-tag
uses: ./.github/workflows/docker-publish.yml
with:
version: ${{ needs.create-tag.outputs.new_tag }}
secrets: inherit

goreleaser:
needs: create-tag
runs-on: ubuntu-latest
Expand Down
Loading