|
28 | 28 | description: "Upload build output GitHub artifact (for local output)" |
29 | 29 | required: false |
30 | 30 | default: false |
| 31 | + artifact-merge: |
| 32 | + type: boolean |
| 33 | + description: "Merge output for multi-platforms build into a single artifact (for local output)" |
| 34 | + required: false |
| 35 | + default: true |
31 | 36 | annotations: |
32 | 37 | type: string |
33 | 38 | description: "List of annotations to set to the image (for image output)" |
|
141 | 146 | artifact-name: |
142 | 147 | description: "Name of the uploaded artifact (for local output)" |
143 | 148 | value: ${{ jobs.finalize.outputs.artifact-name }} |
| 149 | + artifact-merge: |
| 150 | + description: "Whether multiple artifacts were merged (for local output)" |
| 151 | + value: ${{ jobs.finalize.outputs.artifact-merge }} |
144 | 152 | output-type: |
145 | 153 | description: "Build output type" |
146 | 154 | value: ${{ jobs.finalize.outputs.output-type }} |
@@ -717,7 +725,7 @@ jobs: |
717 | 725 | if: ${{ inputs.output == 'local' && inputs.artifact-upload }} |
718 | 726 | uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 |
719 | 727 | with: |
720 | | - name: ${{ inputs.artifact-name }}${{ steps.prepare.outputs.platform-pair-suffix || '0' }} |
| 728 | + name: ${{ inputs.artifact-name }}${{ steps.prepare.outputs.platform-pair-suffix || (inputs.artifact-merge && '' || '0') }} |
721 | 729 | path: ${{ env.LOCAL_EXPORT_DIR }} |
722 | 730 | if-no-files-found: error |
723 | 731 | - |
@@ -757,6 +765,7 @@ jobs: |
757 | 765 | cosign-version: ${{ env.COSIGN_VERSION }} |
758 | 766 | cosign-verify-commands: ${{ steps.set.outputs.cosign-verify-commands }} |
759 | 767 | artifact-name: ${{ inputs.artifact-upload && inputs.artifact-name || '' }} |
| 768 | + artifact-merge: ${{ inputs.artifact-merge }} |
760 | 769 | output-type: ${{ inputs.output }} |
761 | 770 | signed: ${{ needs.prepare.outputs.sign }} |
762 | 771 | needs: |
@@ -837,7 +846,7 @@ jobs: |
837 | 846 | } |
838 | 847 | - |
839 | 848 | name: Merge artifacts |
840 | | - if: ${{ inputs.output == 'local' && inputs.artifact-upload }} |
| 849 | + if: ${{ inputs.output == 'local' && inputs.artifact-upload && inputs.artifact-merge }} |
841 | 850 | uses: actions/upload-artifact/merge@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 |
842 | 851 | with: |
843 | 852 | name: ${{ inputs.artifact-name }} |
|
0 commit comments