Skip to content

Commit

Permalink
Merge pull request #577 from hahwul:dev
Browse files Browse the repository at this point in the history
chore: Update Docker workflow to include workflow_dispatch
  • Loading branch information
hahwul committed Sep 3, 2024
2 parents 7eabda5 + c207f4c commit a0f8d6f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: [ main ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
workflow_dispatch:
inputs:
tags:
description: 'Tags for the Docker image'
required: true
default: 'latest'

env:
# Use docker.io for Docker Hub if empty
Expand Down Expand Up @@ -40,7 +41,6 @@ jobs:
with:
cosign-release: 'v2.1.1'


# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
Expand All @@ -62,7 +62,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
tags: ${{ github.event.inputs.tags }}
labels: |
type=ref,event=branch
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
Expand All @@ -77,4 +78,4 @@ jobs:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit a0f8d6f

Please sign in to comment.