chore(deps): update ghcr.io/immich-app/immich-server docker tag to v2… #780
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: Build Desktop Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: "0 14 * * *" | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write # needed for signing the images with GitHub OIDC Token | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Check current branch | |
| if: github.ref != 'refs/heads/main' | |
| run: exit 0 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Build Image | |
| id: build_image | |
| uses: redhat-actions/buildah-build@v2 | |
| with: | |
| containerfiles: | | |
| ./images/desktop/Containerfile | |
| context: ./images/desktop | |
| image: ghcr.io/frzifus/desktop | |
| tags: latest | |
| archs: amd64 # disable, arm64 | |
| oci: false | |
| - id: docker_meta | |
| uses: docker/metadata-action@v6.0.0 | |
| with: | |
| images: ${{ steps.build_image.outputs.image }} | |
| tags: type=sha,format=long,type=ref,event=branch | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4 | |
| id: registry_login | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push To GHCR | |
| uses: redhat-actions/push-to-registry@v2 | |
| id: push | |
| with: | |
| image: ${{ steps.build_image.outputs.image }} | |
| tags: ${{ steps.build_image.outputs.tags }} | |
| registry: ghcr.io | |
| - name: Install Cosign | |
| uses: sigstore/cosign-installer@v4.1.1 | |
| - name: Sign the images with GitHub OIDC Token | |
| env: | |
| IMAGE: ${{ steps.build_image.outputs.image }} | |
| DIGEST: ${{ steps.push.outputs.digest }} | |
| TAGS: ${{ steps.docker_meta.outputs.tags }} | |
| run: cosign sign --yes ${IMAGE}@${DIGEST} | |
| # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable | |
| # - name: Sign image with a key | |
| # run: | | |
| # images="" | |
| # for tag in ${TAGS}; do | |
| # images+="${tag}@${DIGEST} " | |
| # done | |
| # cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${images} | |
| # env: | |
| # TAGS: ${{ steps.docker_meta.outputs.tags }} | |
| # COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | |
| # COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |
| # DIGEST: ${{ steps.build-and-push.outputs.digest }} |