Skip to content

Commit

Permalink
chore: Update Docker workflow to include workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Sep 3, 2024
1 parent b831e9d commit c207f4c
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 c207f4c

Please sign in to comment.