From: Quinn Casey Date: Thu, 17 Feb 2022 20:24:46 +0000 (-0800) Subject: Build and tag container on PRs X-Git-Tag: ngx-1.6.0-rc1~78^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F79%2Fhead;p=thirdparty%2Fpaperless-ngx.git Build and tag container on PRs --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e297cda29..d54c1d06cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -278,9 +278,9 @@ jobs: asset_name: paperless-ng-${{ steps.get_version.outputs.version }}.tar.xz asset_content_type: application/x-xz - # build and push image to docker hub. + # build and push image to ghcr. build-docker-image: - if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-')) + if: startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-') || startsWith(github.ref, 'refs/pull/') runs-on: ubuntu-latest needs: [frontend, tests, whitespace, codestyle] steps: @@ -295,6 +295,9 @@ jobs: elif [[ $GITHUB_REF == refs/heads/* ]]; then TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/heads/} INSPECT_TAG=${TAGS} + elif [[ $GITHUB_REF == refs/pull/* ]]; then + TAGS=${IMAGE_NAME}:pr-${{ github.event.number }} + INSPECT_TAG=${TAGS} else exit 1 fi