From 73bab9c965331726cd6dd69c26d72bb083583867 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 15 Jun 2024 17:31:33 -0400 Subject: [PATCH 1/3] ci(docker): run on pull request events --- .github/workflows/docker-build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 6f7b7a9..a00e3a7 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" @@ -103,4 +108,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 }} From 629bec6a563fc9688058d096ddfd371de9b560d1 Mon Sep 17 00:00:00 2001 From: ABeltramo Date: Sat, 22 Jun 2024 09:58:09 +0100 Subject: [PATCH 2/3] CI: default images when running in a PR --- .github/workflows/docker-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index a00e3a7..37ef2d2 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -52,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 From 143c1ca038dacc2f707c237710e9a3a714f9ff15 Mon Sep 17 00:00:00 2001 From: ABeltramo Date: Sat, 22 Jun 2024 10:02:10 +0100 Subject: [PATCH 3/3] CI: wrong action name --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 37ef2d2..cb25ef7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -102,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 }}