Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(docker): run on pull request events #8

Merged
merged 3 commits into from
Jun 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Loading