Skip to content

Commit c63d8aa

Browse files
move from expression to shell logic
1 parent 19cf140 commit c63d8aa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/stage-3-build.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
if: needs.get-functions.outputs.FUNC_NAMES != '[]'
8080
outputs:
8181
pr_num_tag: ${{ steps.tags.outputs.pr_num_tag }}
82-
short_commit_hash: ${{ steps.tags.short_commit_hash }}
82+
short_commit_hash: ${{ steps.tags.outputs.short_commit_hash }}
8383
steps:
8484
- uses: actions/checkout@v4
8585
with:
@@ -112,8 +112,12 @@ jobs:
112112
env:
113113
IMAGE_NAME: ${{ inputs.project_name }}-${{ matrix.function }}
114114
PR_NUMBER: ${{ github.event.pull_request.number }}
115-
REGISTRY_REPOSITORY_PATH: ${{ env.USE_AZURECR == 'true' && format('{0}.azurecr.io/{1}-{2}', secrets.ACR_NAME, inputs.project_name, matrix.function) || format('ghcr.io/{0}/{1}-{2}', github.repository_owner, inputs.project_name, matrix.function) }}
115+
ACR_NAME: ${{ secrets.ACR_NAME }}
116+
CONTAINER: ${{ matrix.function }}
116117
run: |
118+
[[ "${USE_AZURECR}" == "true" ]] \
119+
&& REGISTRY_REPOSITORY_PATH="${ACR_NAME}.azurecr.io/${PROJECT_NAME}-${CONTAINER}" \
120+
|| REGISTRY_REPOSITORY_PATH="ghcr.io/${{ github.repository_owner }}/${PROJECT_NAME}-${CONTAINER}"
117121
short_commit_hash=$(git rev-parse --short ${GITHUB_SHA})
118122
echo "short_commit_hash: ${short_commit_hash}"
119123
echo "short_commit_hash=${short_commit_hash}" >> ${GITHUB_OUTPUT}

0 commit comments

Comments
 (0)