Skip to content

Commit dcaf25b

Browse files
committed
Add artifact downsload to shared build
Add support to download built artifacts to shared-build-and-publish-docker-image.yml This is used with two paramers: - artifact-id - the id of the artifact - artifact-path - the location where to download the artifact
1 parent dd1be91 commit dcaf25b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/shared-build-and-publish-docker-image.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ on:
3535
type: string
3636
required: false
3737
default: null
38+
artifact-id:
39+
description: Artifact ID needed to download for the build.
40+
type: string
41+
required: false
42+
default: null
43+
artifact-path:
44+
description: Target where to download the artifact.
45+
type: string
46+
required: false
47+
default: .
3848
secrets:
3949
azure_tenant_id:
4050
required: true
@@ -96,6 +106,13 @@ jobs:
96106
- name: Login to ACR via OIDC
97107
run: az acr login --name ${{ inputs.acr_name }}
98108

109+
- name: Download artifacts
110+
if: ${{ inputs.artifact_id }}
111+
uses: actions/download-artifact@v5
112+
with:
113+
artifact-ids: ${{ inputs.artifact_id }}
114+
path: ${{ inputs.artifact-path }}
115+
99116
- name: Build and push
100117
uses: docker/build-push-action@v6
101118
with:

0 commit comments

Comments
 (0)