Update base image to specific SHA256 digest #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Publish | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| tags: ["v*.*.*"] | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-and-push-image: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image_version: ${{ steps.meta-pretix.outputs.version }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| # --- Pretix app image (web + task) --- | |
| - name: Extract metadata for pretix image | |
| id: meta-pretix | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| - name: Build and push pretix image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| #platforms: linux/amd64,linux/arm64 | |
| platforms: linux/arm64 | |
| target: pretix-build | |
| tags: ${{ steps.meta-pretix.outputs.tags }} | |
| labels: ${{ steps.meta-pretix.outputs.labels }} | |
| secrets: | | |
| github_token=${{ secrets.PLUGIN_REPO_TOKEN }} | |
| # --- Nginx image (static files baked in) --- | |
| - name: Extract metadata for nginx image | |
| id: meta-nginx | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/nginx | |
| - name: Build and push nginx image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| #platforms: linux/amd64,linux/arm64 | |
| platforms: linux/arm64 | |
| target: nginx | |
| tags: ${{ steps.meta-nginx.outputs.tags }} | |
| labels: ${{ steps.meta-nginx.outputs.labels }} | |
| secrets: | | |
| github_token=${{ secrets.PLUGIN_REPO_TOKEN }} |