Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
No need to checkout tag with value override
Browse files Browse the repository at this point in the history
  • Loading branch information
gastonfournier committed May 20, 2024
1 parent 0d70533 commit ac77c3d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ jobs:
matrix:
version: [18.18.2-alpine]
steps:
- name: Checkout tag v${{ inputs.version }}
if: ${{ inputs.version != '' }}
uses: actions/checkout@v4
with:
ref: v${{ inputs.version }}
fetch-tags: true
- name: Checkout
if: ${{ inputs.version == '' }}
uses: actions/checkout@v4
- name: Setup QEmu so we can build multiplatform
uses: docker/setup-qemu-action@v2
Expand All @@ -43,12 +36,12 @@ jobs:
tags: |
# only enabled for workflow dispatch except main (assume its a release):
type=semver,pattern={{ version }},enable=${{ github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' }},value=${{ inputs.version }}
type=semver,pattern={{ major.minor }},enable=${{ github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' }},value=${{ inputs.version }}
type=semver,pattern={{ major }}.{{ minor }},enable=${{ github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' }},value=${{ inputs.version }}
type=semver,pattern={{ major }},enable=${{ github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' }},value=${{ inputs.version }}
# only enabled in main:
type=edge,prefix=main-,suffix=-${{ matrix.version }},enable=${{ github.ref == 'refs/heads/main' }}
# only enabled on workflow_dispatch:
type=sha,suffix=-${{ matrix.version }},enable=${{ github.event_name == 'workflow_dispatch' }}
# only enabled on workflow_dispatch without input version:
type=sha,suffix=-${{ matrix.version }},enable=${{ github.event_name == 'workflow_dispatch' && inputs.version == '' }}
- name: Login to docker hub
run: echo "Ignored"
- name: Build frontend
Expand Down

0 comments on commit ac77c3d

Please sign in to comment.