File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed
actions/build-docker-image Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ inputs:
1313 required : true
1414 PR_NUMBER :
1515 description : ' PR number'
16- required : true
16+ required : false
1717
1818runs :
1919 using : " composite"
@@ -22,18 +22,18 @@ runs:
2222 id : build
2323 shell : bash
2424 run : |
25- echo "🏗️ Building Docker image for PR #${PR_NUMBER} (commit ${{ inputs.commit }})..."
25+ PR_INFO=""
26+ if [ -n "${PR_NUMBER}" ]; then
27+ PR_INFO=" for PR #${PR_NUMBER}"
28+ fi
29+
30+ echo "🏗️ Building Docker image${PR_INFO} (commit ${{ inputs.commit }})..."
2631
2732 if cpflow build-image -a "${{ inputs.app_name }}" --commit="${{ inputs.commit }}" --org="${{ inputs.org }}"; then
2833 image_tag="${{ inputs.org }}/${{ inputs.app_name }}:${{ inputs.commit }}"
2934 echo "image_tag=${image_tag}" >> $GITHUB_OUTPUT
30- echo "✅ Docker image build successful for PR #${PR_NUMBER } (commit ${{ inputs.commit }})"
35+ echo "✅ Docker image build successful${PR_INFO } (commit ${{ inputs.commit }})"
3136 else
32- echo "❌ Docker image build failed for PR #${PR_NUMBER } (commit ${{ inputs.commit }})"
37+ echo "❌ Docker image build failed${PR_INFO } (commit ${{ inputs.commit }})"
3338 exit 1
3439 fi
35-
36- outputs :
37- image_tag :
38- description : ' The tag of the built Docker image'
39- value : ${{ steps.build.outputs.image_tag }}
Original file line number Diff line number Diff line change 5353 needs : validate-branch
5454 if : needs.validate-branch.outputs.is_deployable == 'true'
5555 runs-on : ubuntu-latest
56- outputs :
57- image_tag : ${{ steps.build.outputs.image_tag }}
5856 steps :
5957 - name : Checkout code
6058 uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments