diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 6f7b7a9..cb25ef7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,6 +1,11 @@ name: Docker build on: + pull_request: + types: + - "opened" + - "reopened" + - "synchronize" push: paths-ignore: - "docs" @@ -47,6 +52,13 @@ jobs: echo "cache_from=type=registry,ref=${REGISTRY_IMAGE}:buildcache" >> $GITHUB_OUTPUT echo "cache_to=" >> $GITHUB_OUTPUT fi + + # No token present, might be a PR. Allow build without push + if [ "$IMAGES" = "" ]; then + IMAGES="gameonwhales/inputtino" + PUSH=false + fi + echo "images=${IMAGES}" >> $GITHUB_OUTPUT echo "push=${PUSH}" >> $GITHUB_OUTPUT echo "github_server_url=${GITHUB_SERVER_URL}" >> $GITHUB_OUTPUT @@ -90,7 +102,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GHCR_TOKEN }} - - name: Build Wolf + - name: Build inputtino uses: docker/build-push-action@v3 with: builder: ${{ steps.buildx.outputs.name }} @@ -103,4 +115,4 @@ jobs: BASE_IMAGE=ghcr.io/games-on-whales/base:edge IMAGE_SOURCE=${{ steps.prep.outputs.github_server_url }}/${{ github.repository }} cache-from: ${{ steps.prep.outputs.cache_from }} - cache-to: ${{ steps.prep.outputs.cache_to }} \ No newline at end of file + cache-to: ${{ steps.prep.outputs.cache_to }}