Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Knifa committed Nov 29, 2024
1 parent 8b2c299 commit 634c8fb
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build
on:
push:
branches: docker-test
tags: v*
tags: release/v*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -25,13 +25,16 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set Docker tag
id: tag
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo "tag=${GITHUB_REF_NAME/release/}"
else
echo "tag=edge"
fi >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: |
{{ if startsWith(github.ref, 'refs/tags/') }}
ghcr.io/${{ github.repository }}:{{ github.ref_name }}
{{ else }}
ghcr.io/${{ github.repository }}:edge
{{ end }}
tags: ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.tag }}

0 comments on commit 634c8fb

Please sign in to comment.