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:
13
13
required : true
14
14
PR_NUMBER :
15
15
description : ' PR number'
16
- required : true
16
+ required : false
17
17
18
18
runs :
19
19
using : " composite"
@@ -22,18 +22,18 @@ runs:
22
22
id : build
23
23
shell : bash
24
24
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 }})..."
26
31
27
32
if cpflow build-image -a "${{ inputs.app_name }}" --commit="${{ inputs.commit }}" --org="${{ inputs.org }}"; then
28
33
image_tag="${{ inputs.org }}/${{ inputs.app_name }}:${{ inputs.commit }}"
29
34
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 }})"
31
36
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 }})"
33
38
exit 1
34
39
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 53
53
needs : validate-branch
54
54
if : needs.validate-branch.outputs.is_deployable == 'true'
55
55
runs-on : ubuntu-latest
56
- outputs :
57
- image_tag : ${{ steps.build.outputs.image_tag }}
58
56
steps :
59
57
- name : Checkout code
60
58
uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments