Skip to content

Commit 16e4b54

Browse files
committed
feat(promote): add promote image step
1 parent 14c2e69 commit 16e4b54

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/promote.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,19 @@ on:
8989
required: false
9090
type: boolean
9191
default: true
92+
image-digests:
93+
description: 'JSON with all merged image manifest digests'
94+
required: false
95+
type: string
96+
image-additional-tags:
97+
description: 'Additional image tags to apply (comma-separated, e.g. "stable,prod")'
98+
required: false
99+
type: string
100+
92101

93102
permissions:
94103
contents: write
104+
packages: write
95105

96106
jobs:
97107
promote:
@@ -125,14 +135,24 @@ jobs:
125135
version-script: ${{ inputs.version-script }}
126136
version-chart: ${{ inputs.version-chart }}
127137

138+
- name: promote container images
139+
if: inputs.image-digests != ''
140+
uses: getdevopspro/github-actions/buildx-bake/promote@v5.0.0
141+
with:
142+
version: ${{ steps.release_version.outputs.version }}
143+
image-digests: ${{ inputs.image-digests }}
144+
registry-username: ${{ inputs.registry-username }}
145+
registry-password: ${{ secrets.registry-password || secrets.GITHUB_TOKEN }}
146+
additional-tags: ${{ inputs.image-additional-tags }}
147+
128148
- name: run make target before push
129149
if: inputs.make-target-pre-push != ''
130150
shell: bash
131151
run: |
132152
echo "run make target: ${{ inputs.make-target-pre-push }}"
133153
make ${{ inputs.make-target-pre-push }}
134154
135-
- name: Push git version
155+
- name: push git version
136156
uses: getdevopspro/github-actions/release-git-push@v5.0.0
137157
if: inputs.push-git
138158
id: git_push

0 commit comments

Comments
 (0)