From cf1fad0509b158f79609d00f37f907b31a379cc0 Mon Sep 17 00:00:00 2001 From: jr-k Date: Thu, 8 Aug 2024 03:19:49 +0200 Subject: [PATCH] add pr build --- .github/workflows/pr-build.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index e6995ed..73a2c1d 100755 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -1,13 +1,15 @@ name: Pull-Request build and push ghcr image +permissions: + contents: read + packages: write + on: - pull_request: - types: [opened, synchronize, reopened] - branches: - - develop + repository_dispatch: + types: [build-pr] jobs: - build-and-push-pr: + build-and-push: runs-on: ubuntu-latest steps: @@ -33,11 +35,11 @@ jobs: context: . file: ./Dockerfile push: true - tags: ghcr.io/${{ github.repository_owner }}/obscreen:pr-${{ github.event.number }} + tags: ghcr.io/${{ github.repository_owner }}/obscreen:pr-${{ github.event.client_payload.pr_number }} platforms: linux/amd64, linux/arm64/v8, linux/arm/v7 - name: Create and push manifest uses: docker/metadata-action@v3 with: images: ghcr.io/${{ github.repository_owner }}/obscreen - tags: pr-${{ github.event.number }} + tags: pr-${{ github.event.client_payload.pr_number }}