Skip to content

Commit

Permalink
Update docker-publish.yml
Browse files Browse the repository at this point in the history
Require setting tag
  • Loading branch information
dhh authored Aug 22, 2023
1 parent 7c6d302 commit 3f6ca16
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Docker

on:
workflow_dispatch:
inputs:
tagInput:
description: 'Tag'
required: true

release:
types: [created]
Expand Down Expand Up @@ -31,6 +35,14 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine version tag
id: version-tag
run: |
INPUT_VALUE="${{ github.event.inputs.tagInput }}"
if [ -z "$INPUT_VALUE" ]; then
INPUT_VALUE="${{ github.ref_name }}"
fi
echo "::set-output name=value::$INPUT_VALUE"
-
name: Build and push
uses: docker/build-push-action@v3
Expand All @@ -40,4 +52,4 @@ jobs:
push: true
tags: |
ghcr.io/basecamp/kamal:latest
ghcr.io/basecamp/kamal:${{ github.ref_name }}
ghcr.io/basecamp/kamal:${{ steps.version-tag.outputs.value }}

0 comments on commit 3f6ca16

Please sign in to comment.