62 - Build the production image on tags only
This commit is contained in:
parent
45e1a0a4dd
commit
27ca47997f
1 changed files with 4 additions and 7 deletions
|
|
@ -1,8 +1,9 @@
|
|||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
# Tags only. A release merges to main and is tagged at the same commit, so a
|
||||
# branch trigger here would build and push the image twice.
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
|
||||
jobs:
|
||||
|
|
@ -30,12 +31,8 @@ jobs:
|
|||
- name: Determine tags
|
||||
id: meta
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
||||
TAG="${{ github.ref_name }}"
|
||||
echo "tags=forge.lvl0.xyz/lvl0/incr:${TAG},forge.lvl0.xyz/lvl0/incr:latest" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "tags=forge.lvl0.xyz/lvl0/incr:latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Build and push
|
||||
uses: https://data.forgejo.org/docker/build-push-action@v5
|
||||
|
|
|
|||
Loading…
Reference in a new issue