|
6 | 6 |
|
7 | 7 | env: |
8 | 8 | GIT_CLIFF_VERSION: 2.12.0 |
| 9 | + GL_VERSION: 2150.1.0 |
9 | 10 |
|
10 | 11 | jobs: |
11 | 12 | docs: |
|
72 | 73 | --body " |
73 | 74 | $(git-cliff -o - --current) |
74 | 75 | " |
| 76 | +
|
| 77 | + create-oci-release: |
| 78 | + if: ${{ github.ref_name == 'main' }} |
| 79 | + runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-latest-arm' || 'ubuntu-latest' }} |
| 80 | + permissions: |
| 81 | + contents: write |
| 82 | + strategy: |
| 83 | + matrix: |
| 84 | + arch: [amd64, arm64] |
| 85 | + |
| 86 | + steps: |
| 87 | + - name: Checkout commit |
| 88 | + uses: actions/checkout@v6 |
| 89 | + with: |
| 90 | + sparse-checkout: | |
| 91 | + src/oci |
| 92 | + sparse-checkout-cone-mode: false |
| 93 | + - uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@main |
| 94 | + - name: Get the Git tag name |
| 95 | + id: get-tag-name |
| 96 | + run: echo "tag-name=${GITHUB_REF/refs\/tags\//}" | tee -a "$GITHUB_OUTPUT" |
| 97 | + - name: Create OCI container and release |
| 98 | + env: |
| 99 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 100 | + run: | |
| 101 | + gl-oci build-container \ |
| 102 | + --container "ghcr.io/${{ github.repository }}/container" \ |
| 103 | + --tag "${{ matrix.arch }}-${{ steps.get-tag-name.outputs.tag-name }}" \ |
| 104 | + --oci_archive "container_${{ matrix.arch }}.oci" \ |
| 105 | + --platform linux/${{ matrix.arch }} \ |
| 106 | + --dir "src/oci" \ |
| 107 | + --build_arg GL_VERSION=$GL_VERSION \ |
| 108 | + --build_arg PY_GL_VERSION="${{ steps.get-tag-name.outputs.tag-name }}" |
| 109 | +
|
| 110 | + gl-oci push-container \ |
| 111 | + --container "ghcr.io/${{ github.repository }}/container" \ |
| 112 | + --tag "${{ matrix.arch }}-${{ steps.get-tag-name.outputs.tag-name }}" |
| 113 | +
|
| 114 | + gl-oci add-container-to-index \ |
| 115 | + --index "ghcr.io/${{ github.repository }}/container" \ |
| 116 | + --index-tag "${{ steps.get-tag-name.outputs.tag-name }}" \ |
| 117 | + --container "ghcr.io/${{ github.repository }}/container" \ |
| 118 | + --tag "${{ matrix.arch }}-${{ steps.get-tag-name.outputs.tag-name }}" |
| 119 | + - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # pin@v7.0.0 |
| 120 | + with: |
| 121 | + name: container-${{ matrix.arch }} |
| 122 | + path: container_${{ matrix.arch }}.oci |
| 123 | + if-no-files-found: error |
0 commit comments