|
5 | 5 | version: |
6 | 6 | type: string |
7 | 7 | default: today |
| 8 | + upload_version: |
| 9 | + type: string |
| 10 | + default: "" |
| 11 | + additional_semver_tag: |
| 12 | + type: boolean |
| 13 | + default: true |
| 14 | + flavor_filter: |
| 15 | + type: string |
| 16 | + default: '--exclude "bare-*"' |
8 | 17 | jobs: |
9 | 18 | generate_matrix_publish: |
10 | 19 | name: Generate flavors matrix to publish |
11 | 20 | uses: gardenlinux/gardenlinux/.github/workflows/build_flavors_matrix.yml@3b5ec77e4873462d56658c4ecd56caa0ff63542b |
12 | 21 | with: |
13 | | - flags: '--exclude "bare-*" --no-arch --json-by-arch --build --test' |
| 22 | + flags: '${{ inputs.flavor_filter }} --no-arch --json-by-arch --build --test' |
14 | 23 | upload_gl_artifacts: |
15 | 24 | name: upload to OCI |
16 | 25 | needs: [ generate_matrix_publish ] |
@@ -62,17 +71,19 @@ jobs: |
62 | 71 | --dir "${CNAME}" \ |
63 | 72 | --container "ghcr.io/${{ github.repository }}" \ |
64 | 73 | --arch ${{ matrix.arch }} \ |
65 | | - --version ${{ inputs.version }} \ |
| 74 | + --version ${{ inputs.upload_version || inputs.version }} \ |
66 | 75 | --cname "${CNAME}" \ |
67 | 76 | --cosign_file digest.txt \ |
68 | 77 | --manifest_file "oci_manifest_entry_${CNAME}.json" |
69 | 78 | - name: Add additional semver tag |
| 79 | + if: ${{ inputs.additional_semver_tag }} |
70 | 80 | run: | |
71 | 81 | echo ${{ secrets.GITHUB_TOKEN }} | oras login -u ${{ github.repository_owner }} --password-stdin ghcr.io |
| 82 | + UPLOAD_VER="${{ inputs.upload_version || inputs.version }}" |
72 | 83 | CNAME2=${CNAME//_/-} |
73 | 84 | CNAME2=${CNAME2//-${{ inputs.version }}/} |
74 | | - echo "Adding additional tag: ${{ inputs.version }}-${CNAME2}-${{ matrix.arch }}" |
75 | | - oras tag ghcr.io/${{ github.repository }}:${{ inputs.version }}-${CNAME}-${{ matrix.arch }} ${{ inputs.version }}-${CNAME2}-${{ matrix.arch }} |
| 85 | + echo "Adding additional tag: ${UPLOAD_VER}-${CNAME2}-${{ matrix.arch }}" |
| 86 | + oras tag ghcr.io/${{ github.repository }}:${UPLOAD_VER}-${CNAME}-${{ matrix.arch }} ${UPLOAD_VER}-${CNAME2}-${{ matrix.arch }} |
76 | 87 | - uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # [email protected] |
77 | 88 | with: |
78 | 89 | path: oci_manifest_entry_${{ env.CNAME }}.json |
@@ -125,5 +136,5 @@ jobs: |
125 | 136 |
|
126 | 137 | gl-oci update-index \ |
127 | 138 | --container "ghcr.io/${{ github.repository }}" \ |
128 | | - --version ${{ inputs.version }} \ |
| 139 | + --version ${{ inputs.upload_version || inputs.version }} \ |
129 | 140 | --manifest_folder manifests |
0 commit comments