Update docker-publish.yml
Require setting tag
This commit is contained in:
committed by
GitHub
parent
7c6d302baa
commit
3f6ca1648e
14
.github/workflows/docker-publish.yml
vendored
14
.github/workflows/docker-publish.yml
vendored
@@ -2,6 +2,10 @@ name: Docker
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tagInput:
|
||||
description: 'Tag'
|
||||
required: true
|
||||
|
||||
release:
|
||||
types: [created]
|
||||
@@ -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
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user