From 12367c031305cd0d2d945b44d51e379b269cdfa7 Mon Sep 17 00:00:00 2001 From: Lennart Date: Fri, 5 Mar 2021 19:45:26 +0100 Subject: [PATCH] publish docker images for prs --- .github/workflows/container-release.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml index 1f811b7c..4be70a6b 100644 --- a/.github/workflows/container-release.yml +++ b/.github/workflows/container-release.yml @@ -4,6 +4,8 @@ on: push: branches: - "master" + pull_request: + branches: "master" schedule: - cron: 0 0 * * * @@ -37,3 +39,16 @@ jobs: labels: quay.expires-after=12w push: true tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest + + - uses: jwalton/gh-find-current-pr@v1 + id: findPr + + - name: Build and push PR build + if: success() && steps.findPr.outputs.number + uses: docker/build-push-action@v2 + with: + context: . + file: docker/Dockerfile + labels: quay.expires-after=2w + push: true + tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:${{ steps.findPr.outputs.number }}