Skip to content

Commit

Permalink
fix tag docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Nov 29, 2023
1 parent b4dca13 commit d0d97f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,26 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Tag version
if: ${{ startsWith( github.ref_name , 'v') }}
id: tag
run: |
export TAG="${{ github.ref_name }}"
echo "tag=${TAG:1}" >> "$GITHUB_OUTPUT"
- name: Build and push (Tag)
if: ${{ contains( github.ref_name , 'v') }}
if: ${{ startsWith( github.ref_name , 'v') }}
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.event.inputs.version || github.ref_name }}
VERSION=${{ steps.tag.outpus.tag }}
- name: Build and push
if: ${{ ! contains( github.ref_name , 'v') }}
if: ${{ ! startsWith( github.ref_name , 'v') }}
uses: docker/build-push-action@v5
with:
context: .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
repo_token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
automatic_release_tag: "${{ steps.tag.outputs.tag }}"
prerelease: false
title: "Release ${{ steps.tag.outputs.tag }}"
title: "${{ steps.tag.outputs.tag }}"

0 comments on commit d0d97f5

Please sign in to comment.