|
59 | 59 | - ubuntu-24.04-arm |
60 | 60 | env: |
61 | 61 | RUNTIME_VERSION: ${{ matrix.config.runtime }} |
62 | | - IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/devcontainers/${{ matrix.config.template }} |
| 62 | + IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/devcontainers/${{ matrix.config.template }}-base |
63 | 63 | steps: |
64 | 64 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
65 | 65 |
|
@@ -103,7 +103,7 @@ jobs: |
103 | 103 | matrix: |
104 | 104 | config: ${{ fromJSON(needs.prepare.outputs.configs) }} |
105 | 105 | env: |
106 | | - IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/devcontainers/${{ matrix.config.template }} |
| 106 | + IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/devcontainers/${{ matrix.config.template }}-base |
107 | 107 | RUNTIME_VERSION: ${{ matrix.config.runtime }} |
108 | 108 | steps: |
109 | 109 | - name: Log in to GitHub Container Registry |
@@ -133,3 +133,31 @@ jobs: |
133 | 133 | any(.manifests[]; .platform.os == "linux" and .platform.architecture == $architecture) |
134 | 134 | ' <<< "${manifest}" > /dev/null |
135 | 135 | done |
| 136 | +
|
| 137 | + verify-public: |
| 138 | + needs: |
| 139 | + - prepare |
| 140 | + - merge |
| 141 | + runs-on: ubuntu-24.04 |
| 142 | + env: |
| 143 | + CONFIGS: ${{ needs.prepare.outputs.configs }} |
| 144 | + steps: |
| 145 | + - name: Verify anonymous image access |
| 146 | + shell: bash |
| 147 | + run: | |
| 148 | + failed=false |
| 149 | + while IFS= read -r config; do |
| 150 | + template=$(jq -r '.template' <<< "${config}") |
| 151 | + runtime=$(jq -r '.runtime' <<< "${config}") |
| 152 | + image="ghcr.io/${GITHUB_REPOSITORY_OWNER}/devcontainers/${template}-base:${runtime}-noble" |
| 153 | +
|
| 154 | + echo "Verifying anonymous access to ${image}" |
| 155 | + if ! docker buildx imagetools inspect "${image}" > /dev/null; then |
| 156 | + echo "::error::Package '${template}-base' must be made public in GitHub Packages." |
| 157 | + failed=true |
| 158 | + fi |
| 159 | + done < <(jq -c '.[]' <<< "${CONFIGS}") |
| 160 | +
|
| 161 | + if [ "${failed}" = true ]; then |
| 162 | + exit 1 |
| 163 | + fi |
0 commit comments