diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 00000000..9a13a3bd --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,41 @@ +name: Build release + +on: + release: + tags: + - 'v*' + types: + - created + +jobs: + build-release: + name: Build release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create image tags + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/scicatproject/landingpageserver + flavor: latest=false + tags: | + type=raw,value=stable + type=ref,event=tag + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64,linux/arm64/v8 + push: true + tags: ${{ steps.meta.outputs.tags }}