Coves frontend - a photon fork
at main 57 lines 1.7 kB view raw
1name: Create and publish a Docker image 2on: 3 release: 4 types: [published] 5env: 6 REGISTRY: ghcr.io 7 IMAGE_NAME: ${{ github.repository }} 8jobs: 9 build-and-push-image: 10 runs-on: ubuntu-latest 11 permissions: 12 contents: read 13 packages: write 14 steps: 15 - name: Checkout 16 uses: actions/checkout@v3 17 - name: Docker meta 18 id: meta 19 uses: docker/metadata-action@v4 20 with: 21 images: ghcr.io/${{ env.IMAGE_NAME }} 22 flavor: | 23 latest=${{ !github.event.release.prerelease }} 24 prefix= 25 suffix= 26 - name: Set up QEMU 27 uses: docker/setup-qemu-action@v2 28 - name: Set up Docker Buildx 29 uses: docker/setup-buildx-action@v2 30 - name: Log in to the Container registry 31 uses: docker/login-action@v2 32 with: 33 registry: ghcr.io 34 username: ${{ github.actor }} 35 password: ${{ github.token }} 36 - name: Build/push Bun image 37 uses: docker/build-push-action@v4 38 with: 39 context: . 40 platforms: linux/amd64,linux/arm64 41 push: true 42 tags: ${{ steps.meta.outputs.tags }} 43 labels: ${{ steps.meta.outputs.labels }} 44 cache-from: type=gha 45 cache-to: type=gha,mode=max 46 target: bun 47 - name: Build/push Node image 48 uses: docker/build-push-action@v4 49 with: 50 context: . 51 platforms: linux/amd64,linux/arm64 52 push: true 53 tags: ${{ steps.meta.outputs.tags }}-node 54 labels: ${{ steps.meta.outputs.labels }} 55 cache-from: type=gha 56 cache-to: type=gha,mode=max 57 target: node