Skip to content

Commit e05e0da

Browse files
committed
chore: Update coolify-helper.yml to get version from versions.json
1 parent 3f34df2 commit e05e0da

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/coolify-helper.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
registry: ${{ env.REGISTRY }}
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Get Version
29+
id: version
30+
run: |
31+
echo "VERSION=$(docker run --rm -v "$(pwd):/app" -w /app ghcr.io/jqlang/jq:latest '.coolify.helper.version' versions.json)"|xargs >> $GITHUB_OUTPUT
2832
- name: Build image and push to registry
2933
uses: docker/build-push-action@v5
3034
with:
@@ -33,7 +37,7 @@ jobs:
3337
file: docker/coolify-helper/Dockerfile
3438
platforms: linux/amd64
3539
push: true
36-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
40+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}
3741
aarch64:
3842
runs-on: [ self-hosted, arm64 ]
3943
permissions:
@@ -47,6 +51,10 @@ jobs:
4751
registry: ${{ env.REGISTRY }}
4852
username: ${{ github.actor }}
4953
password: ${{ secrets.GITHUB_TOKEN }}
54+
- name: Get Version
55+
id: version
56+
run: |
57+
echo "VERSION=$(docker run --rm -v "$(pwd):/app" -w /app ghcr.io/jqlang/jq:latest '.coolify.helper.version' versions.json)"|xargs >> $GITHUB_OUTPUT
5058
- name: Build image and push to registry
5159
uses: docker/build-push-action@v5
5260
with:
@@ -55,7 +63,7 @@ jobs:
5563
file: docker/coolify-helper/Dockerfile
5664
platforms: linux/aarch64
5765
push: true
58-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-aarch64
66+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-aarch64
5967
merge-manifest:
6068
runs-on: ubuntu-latest
6169
permissions:
@@ -75,9 +83,13 @@ jobs:
7583
registry: ${{ env.REGISTRY }}
7684
username: ${{ github.actor }}
7785
password: ${{ secrets.GITHUB_TOKEN }}
86+
- name: Get Version
87+
id: version
88+
run: |
89+
echo "VERSION=$(docker run --rm -v "$(pwd):/app" -w /app ghcr.io/jqlang/jq:latest '.coolify.helper.version' versions.json)"|xargs >> $GITHUB_OUTPUT
7890
- name: Create & publish manifest
7991
run: |
80-
docker buildx imagetools create --append ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-aarch64 --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
92+
docker buildx imagetools create --append ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-aarch64 --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }} --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
8193
- uses: sarisia/actions-status-discord@v1
8294
if: always()
8395
with:

0 commit comments

Comments
 (0)