Skip to content

Commit

Permalink
Allow setting dev tagging manually
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Aug 30, 2024
1 parent 660ac5d commit 4093cff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@ jobs:
if [[ ${{ github.event_name }} == 'push' ]]; then
TAG_REF=${GITHUB_REF#refs/tags/}
CHECKOUT_REF=$GITHUB_REF
DEV_TAG="false"
elif [[ ${{ github.event_name }} == 'schedule' ]]; then
TAG_REF=dev
CHECKOUT_REF=refs/heads/dev
DEV_TAG="true"
elif [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
TAG_REF=${{ inputs.tag }}
CHECKOUT_REF=${{ inputs.tag }}
DEV_TAG="false"
if [ -z "$TAG_REF" ]; then
TAG_REF=dev
CHECKOUT_REF=dev
DEV_TAG="true"
fi
else
echo "Unsupported event"
Expand All @@ -54,6 +58,7 @@ jobs:
VERSION=${TAG_REF#v}
echo "Version: $VERSION"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "dev_tag=$DEV_TAG" >> "$GITHUB_OUTPUT"
echo "checkout_ref=$CHECKOUT_REF" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
- name: Cache NPM
Expand Down Expand Up @@ -267,7 +272,7 @@ jobs:
type=semver,pattern={{version}},value=${{ needs.setup.outputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.setup.outputs.version }}
type=semver,pattern={{major}},value=${{ needs.setup.outputs.version }}
type=raw,value=dev,priority=200,enable={{is_default_branch}}
type=raw,value=dev,priority=200,enable=${{ needs.setup.outputs.dev_tag }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down

0 comments on commit 4093cff

Please sign in to comment.