Skip to content

Commit

Permalink
ci(docker): run on pull request events (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Jun 22, 2024
1 parent 8a33706 commit cdfdc18
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Docker build

on:
pull_request:
types:
- "opened"
- "reopened"
- "synchronize"
push:
paths-ignore:
- "docs"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
cache-to: ${{ steps.prep.outputs.cache_to }}

0 comments on commit cdfdc18

Please sign in to comment.