Skip to content

Commit 69d7771

Browse files
committed
expose IMAGE_DIGEST to k8ify
Issue: APPX-177
1 parent 25b58a4 commit 69d7771

5 files changed

Lines changed: 16 additions & 3 deletions

File tree

.github/actions/build/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ inputs:
88
TARGET:
99
required: false
1010
name: Build
11+
outputs:
12+
IMAGE_DIGEST:
13+
description: image digest
14+
value: "${{ steps.build.outputs.digest }}"
1115
runs:
1216
steps:
1317
- run: "yq '.users.0.user.token' \"${KUBECONFIG}\" | docker login -u appflow-deployer --password-stdin '${{ inputs.REGISTRY }}'"
1418
shell: bash
1519
- uses: docker/setup-buildx-action@v3
16-
- uses: docker/build-push-action@v6
20+
- id: build
21+
uses: docker/build-push-action@v6
1722
with:
1823
provenance: false
1924
push: true

.github/workflows/prod-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
with:
1515
KUBECONFIG_DATA: "${{ secrets.KUBECONFIG_PROD }}"
1616
- env:
17+
IMAGE_DIGEST: "${{ steps.build.outputs.IMAGE_DIGEST || 'not built in this job' }}"
1718
NEWLINE: |2+
1819
1920
name: k8ify deploy

.github/workflows/prod.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ jobs:
1111
- uses: ./.github/actions/setup
1212
with:
1313
KUBECONFIG_DATA: "${{ secrets.KUBECONFIG_PROD }}"
14-
- uses: ./.github/actions/build
14+
- id: build
15+
uses: ./.github/actions/build
1516
with:
1617
IMGNAME: "${{ env.CI_PROJECT_NAME }}"
1718
REGISTRY: "${{ env.REGISTRY }}"
1819
- env:
20+
IMAGE_DIGEST: "${{ steps.build.outputs.IMAGE_DIGEST || 'not built in this job' }}"
1921
NEWLINE: |2+
2022
2123
name: k8ify preview

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ jobs:
1111
- uses: ./.github/actions/setup
1212
with:
1313
KUBECONFIG_DATA: "${{ secrets.KUBECONFIG_TEST }}"
14-
- uses: ./.github/actions/build
14+
- id: build
15+
uses: ./.github/actions/build
1516
with:
1617
IMGNAME: "${{ env.CI_PROJECT_NAME }}"
1718
REGISTRY: "${{ env.REGISTRY }}"
1819
- env:
20+
IMAGE_DIGEST: "${{ steps.build.outputs.IMAGE_DIGEST || 'not built in this job' }}"
1921
NEWLINE: |2+
2022
2123
name: k8ify preview
@@ -26,6 +28,7 @@ jobs:
2628
rm .composeenv
2729
kubectl diff -f manifests/ || true
2830
- env:
31+
IMAGE_DIGEST: "${{ steps.build.outputs.IMAGE_DIGEST || 'not built in this job' }}"
2932
NEWLINE: |2+
3033
3134
name: k8ify deploy

compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ services:
55
- "8080:8080"
66
environment:
77
- admin_pw=$ADMIN_PW
8+
labels:
9+
k8ify.annotations.IMAGE_DIGEST: $IMAGE_DIGEST

0 commit comments

Comments
 (0)