Skip to content

Commit 239f9c4

Browse files
authored
Merge pull request #274 from hackthedev/beta
Docker Fix
2 parents 8bcf6b2 + aab4bd5 commit 239f9c4

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/docker.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
- beta
88
release:
9-
types: [ published ]
9+
types: [published]
1010

1111
env:
1212
REGISTRY: ghcr.io
@@ -48,7 +48,7 @@ jobs:
4848
id: meta-release
4949
run: |
5050
VERSION="${GITHUB_REF_NAME}"
51-
VERSION="${VERSION#v}" # "v1.0.0" -> "1.0.0"
51+
VERSION="${VERSION#v}"
5252
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${VERSION},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
5353
echo "tags=$TAGS" >> $GITHUB_OUTPUT
5454
@@ -61,21 +61,30 @@ jobs:
6161
push: true
6262
tags: ${{ steps.meta-branch.outputs.tags || steps.meta-release.outputs.tags }}
6363

64-
- name: Set image tags ptero (branch)
64+
- name: Set image tags ptero (branch)
6565
if: github.event_name == 'push'
66-
id: ptero-release
66+
id: ptero-branch
6767
run: |
6868
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-ptero"
6969
if [ "${{ github.ref_name }}" = "main" ]; then
7070
TAGS="$TAGS,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-ptero"
7171
fi
72-
echo "ptero-tags=$TAGS" >> $GITHUB_OUTPUT
72+
echo "tags=$TAGS" >> $GITHUB_OUTPUT
73+
74+
- name: Set image tags ptero (release)
75+
if: github.event_name == 'release'
76+
id: ptero-release
77+
run: |
78+
VERSION="${GITHUB_REF_NAME}"
79+
VERSION="${VERSION#v}"
80+
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${VERSION}-ptero,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-ptero"
81+
echo "tags=$TAGS" >> $GITHUB_OUTPUT
7382
74-
- name: Build and push ptero shit
83+
- name: Build and push ptero image
7584
uses: docker/build-push-action@v5
7685
with:
7786
platforms: linux/amd64,linux/arm64
7887
context: .
7988
file: ./Dockerfile.ptero
8089
push: true
81-
tags: ${{ steps.ptero-release.outputs.ptero-tags }}
90+
tags: ${{ steps.ptero-branch.outputs.tags || steps.ptero-release.outputs.tags }}

0 commit comments

Comments
 (0)