diff --git a/.github/workflows/manual-image-publish.yml b/.github/workflows/manual-image-publish.yml index 6c91f220..b6b88138 100644 --- a/.github/workflows/manual-image-publish.yml +++ b/.github/workflows/manual-image-publish.yml @@ -16,10 +16,12 @@ jobs: publish_from_branch: uses: ./.github/workflows/image-publish.yml - needs: build_from_branch + needs: + - setup_env + - build_from_branch secrets: inherit with: gar_push_enabled: true gar_image_name: us-docker.pkg.dev/vorvan/mlops-dev/h2oai-modelscoring-restscorer ecr_push_enabled: false - image_tags: "${{ needs.setup_env.outputs.sanitized_branch_name }}" + image_tags: "${{ needs.setup_env.outputs.sanitized_branch_name }}-${{ needs.setup_env.outputs.commit_hash }}" diff --git a/.github/workflows/setup-environment.yml b/.github/workflows/setup-environment.yml index dd48a252..83ecc981 100644 --- a/.github/workflows/setup-environment.yml +++ b/.github/workflows/setup-environment.yml @@ -42,6 +42,7 @@ jobs: run: | if ${{ github.event_name == 'pull_request' }}; then echo "sha=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT; fi if ${{ github.event_name == 'push' }}; then echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT; fi + if ${{ github.event_name == 'workflow_dispatch' }}; then echo "sha=$(git rev-parse --short=7 ${{ github.ref }})" >> $GITHUB_OUTPUT; fi - name: Save Github Release Base Version id: release_base_version