Skip to content

Commit

Permalink
fix: ci: publish correct docker tags on workflow dispatch (filecoin-p…
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh authored May 29, 2024
1 parent a5ec2fb commit cf8d187
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ jobs:
with:
submodules: 'recursive'
ref: ${{ inputs.ref || github.ref }}
- id: git
env:
REF: ${{ inputs.ref || github.ref }}
run: |
ref="${REF#refs/heads/}"
ref="${ref#refs/tags/}"
sha="$(git rev-parse --short HEAD)"
echo "ref=$ref" | tee -a "$GITHUB_OUTPUT"
echo "sha=$sha" | tee -a "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
Expand All @@ -76,10 +85,9 @@ jobs:
with:
images: filecoin/${{ matrix.image }}
tags: |
type=schedule
type=raw,enable=${{ github.event_name != 'schedule' && steps.channel.outputs.channel != '' }},value=${{ steps.channel.outputs.channel }}
type=ref,event=tag
type=sha,prefix=
type=raw,enable=${{ steps.channel.outputs.channel != '' }},value=${{ steps.channel.outputs.channel }}
type=raw,enable=${{ startsWith(inputs.ref || github.ref, 'refs/tags/') }},value=${{ steps.git.outputs.ref }}
type=raw,value=${{ steps.git.outputs.sha }}
flavor: |
latest=false
suffix=${{ matrix.network != 'mainnet' && format('-{0}', matrix.network) || '' }}
Expand Down

0 comments on commit cf8d187

Please sign in to comment.