Skip to content

Commit

Permalink
fix: yet another docker/metadata-action setup
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Jan 17, 2025
1 parent c19b6cc commit ef9da6c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/add-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@ jobs:
git push origin ${{ github.event.client_payload.tag }}
env:
GITHUB_TOKEN: ${{ secrets.TEBAKO_CI_PAT_TOKEN }}

- name: Set output
id: set_output
run: echo "::set-output name=tag::v${{ github.event.client_payload.tag }}"
17 changes: 12 additions & 5 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ jobs:
- name: Set GITHUB_REF
if: github.event_name == 'workflow_run'
run: |
echo "Setting GITHUB_REF to refs/tags/$(git tag --sort=-v:refname | grep -v '\.rc[0-9]\+$' | head -n 1)"
echo "GITHUB_REF=refs/tags/$(git tag --sort=-v:refname | grep -v '\.rc[0-9]\+$' | head -n 1)" >> $GITHUB_ENV
TAG=$(git tag --sort=-v:refname | grep -v '\.rc[0-9]\+$' | head -n 1)
VERSION=${TAG#v}
echo "Setting VERSION to $VERSION"
echo "Setting GITHUB_REF to refs/tags/$TAG"
echo "GITHUB_REF=refs/tags/$TAG" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/login-action@v3
Expand All @@ -55,9 +59,12 @@ jobs:
images: |
ghcr.io/tamatebako/tebako-${{ matrix.container }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{version}},value=${{ env.VERSION }},enable=${{ github.event_name == 'workflow_run' }}
type=semver,pattern={{version}},enable=${{ github.event_name != 'workflow_run' }}
type=semver,pattern={{major}}.{{minor}},value=${{ env.VERSION }},enable=${{ github.event_name == 'workflow_run' }}
type=semver,pattern={{major}}.{{minor}},enable=${{ github.event_name != 'workflow_run' }}
type=semver,pattern={{major}},value=${{ env.VERSION }},enable=${{ github.event_name == 'workflow_run' }}
type=semver,pattern={{major}},enable=${{ github.event_name != 'workflow_run' }}
type=sha
labels: |
org.opencontainers.image.vendor=Ribose Inc.
Expand Down

0 comments on commit ef9da6c

Please sign in to comment.