|
53 | 53 | if-no-files-found: error |
54 | 54 | retention-days: 1 |
55 | 55 |
|
| 56 | + image-build-dashboard: |
| 57 | + runs-on: ubuntu-latest |
| 58 | + steps: |
| 59 | + - name: Checkout |
| 60 | + uses: actions/checkout@v4 |
| 61 | + |
| 62 | + - name: Docker meta |
| 63 | + id: meta |
| 64 | + uses: docker/metadata-action@v5 |
| 65 | + with: |
| 66 | + images: ghcr.io/${{ github.repository_owner }}/tinyauth-analytics-dashboard |
| 67 | + |
| 68 | + - name: Login to GitHub Container Registry |
| 69 | + uses: docker/login-action@v3 |
| 70 | + with: |
| 71 | + registry: ghcr.io |
| 72 | + username: ${{ github.repository_owner }} |
| 73 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 74 | + |
| 75 | + - name: Set up Docker Buildx |
| 76 | + uses: docker/setup-buildx-action@v3 |
| 77 | + |
| 78 | + - name: Build and push |
| 79 | + uses: docker/build-push-action@v6 |
| 80 | + id: build |
| 81 | + with: |
| 82 | + platforms: linux/amd64 |
| 83 | + labels: ${{ steps.meta.outputs.labels }} |
| 84 | + tags: ghcr.io/${{ github.repository_owner }}/tinyauth-analytics-dashboard |
| 85 | + outputs: type=image,push-by-digest=true,name-canonical=true,push=true |
| 86 | + context: ./dashboard |
| 87 | + build-args: | |
| 88 | + VERSION=${{ github.ref_name }} |
| 89 | +
|
| 90 | + - name: Export digest |
| 91 | + run: | |
| 92 | + mkdir -p ${{ runner.temp }}/digests |
| 93 | + digest="${{ steps.build.outputs.digest }}" |
| 94 | + touch "${{ runner.temp }}/digests/${digest#sha256:}" |
| 95 | +
|
| 96 | + - name: Upload digest |
| 97 | + uses: actions/upload-artifact@v4 |
| 98 | + with: |
| 99 | + name: digests-dashboard-linux-amd64 |
| 100 | + path: ${{ runner.temp }}/digests/* |
| 101 | + if-no-files-found: error |
| 102 | + retention-days: 1 |
| 103 | + |
56 | 104 | image-build-arm: |
57 | 105 | runs-on: ubuntu-24.04-arm |
58 | 106 | steps: |
@@ -100,6 +148,54 @@ jobs: |
100 | 148 | if-no-files-found: error |
101 | 149 | retention-days: 1 |
102 | 150 |
|
| 151 | + image-build-arm-dashboard: |
| 152 | + runs-on: ubuntu-24.04-arm |
| 153 | + steps: |
| 154 | + - name: Checkout |
| 155 | + uses: actions/checkout@v4 |
| 156 | + |
| 157 | + - name: Docker meta |
| 158 | + id: meta |
| 159 | + uses: docker/metadata-action@v5 |
| 160 | + with: |
| 161 | + images: ghcr.io/${{ github.repository_owner }}/tinyauth-analytics-dashboard |
| 162 | + |
| 163 | + - name: Login to GitHub Container Registry |
| 164 | + uses: docker/login-action@v3 |
| 165 | + with: |
| 166 | + registry: ghcr.io |
| 167 | + username: ${{ github.repository_owner }} |
| 168 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 169 | + |
| 170 | + - name: Set up Docker Buildx |
| 171 | + uses: docker/setup-buildx-action@v3 |
| 172 | + |
| 173 | + - name: Build and push |
| 174 | + uses: docker/build-push-action@v6 |
| 175 | + id: build |
| 176 | + with: |
| 177 | + platforms: linux/arm64 |
| 178 | + labels: ${{ steps.meta.outputs.labels }} |
| 179 | + tags: ghcr.io/${{ github.repository_owner }}/tinyauth-analytics-dashboard |
| 180 | + outputs: type=image,push-by-digest=true,name-canonical=true,push=true |
| 181 | + context: ./dashboard |
| 182 | + build-args: | |
| 183 | + VERSION=${{ github.ref_name }} |
| 184 | +
|
| 185 | + - name: Export digest |
| 186 | + run: | |
| 187 | + mkdir -p ${{ runner.temp }}/digests |
| 188 | + digest="${{ steps.build.outputs.digest }}" |
| 189 | + touch "${{ runner.temp }}/digests/${digest#sha256:}" |
| 190 | +
|
| 191 | + - name: Upload digest |
| 192 | + uses: actions/upload-artifact@v4 |
| 193 | + with: |
| 194 | + name: digests-dashboard-linux-arm64 |
| 195 | + path: ${{ runner.temp }}/digests/* |
| 196 | + if-no-files-found: error |
| 197 | + retention-days: 1 |
| 198 | + |
103 | 199 | image-merge: |
104 | 200 | runs-on: ubuntu-latest |
105 | 201 | needs: |
@@ -138,3 +234,42 @@ jobs: |
138 | 234 | run: | |
139 | 235 | docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ |
140 | 236 | $(printf 'ghcr.io/${{ github.repository_owner }}/tinyauth-analytics@sha256:%s ' *) |
| 237 | +
|
| 238 | + image-merge-dashboard: |
| 239 | + runs-on: ubuntu-latest |
| 240 | + needs: |
| 241 | + - image-build-dashboard |
| 242 | + - image-build-arm-dashboard |
| 243 | + steps: |
| 244 | + - name: Download digests |
| 245 | + uses: actions/download-artifact@v4 |
| 246 | + with: |
| 247 | + path: ${{ runner.temp }}/digests |
| 248 | + pattern: digests-dashboard* |
| 249 | + merge-multiple: true |
| 250 | + |
| 251 | + - name: Login to GitHub Container Registry |
| 252 | + uses: docker/login-action@v3 |
| 253 | + with: |
| 254 | + registry: ghcr.io |
| 255 | + username: ${{ github.repository_owner }} |
| 256 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 257 | + |
| 258 | + - name: Set up Docker Buildx |
| 259 | + uses: docker/setup-buildx-action@v3 |
| 260 | + |
| 261 | + - name: Docker meta |
| 262 | + id: meta |
| 263 | + uses: docker/metadata-action@v5 |
| 264 | + with: |
| 265 | + images: ghcr.io/${{ github.repository_owner }}/tinyauth-analytics-dashboard |
| 266 | + tags: | |
| 267 | + type=semver,pattern={{version}},prefix=v |
| 268 | + type=semver,pattern={{major}},prefix=v |
| 269 | + type=semver,pattern={{major}}.{{minor}},prefix=v |
| 270 | +
|
| 271 | + - name: Create manifest list and push |
| 272 | + working-directory: ${{ runner.temp }}/digests |
| 273 | + run: | |
| 274 | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ |
| 275 | + $(printf 'ghcr.io/${{ github.repository_owner }}/tinyauth-analytics-dashboard@sha256:%s ' *) |
0 commit comments