Skip to content

Commit f62cbc5

Browse files
ci: add a simple check to make sure the image builds for PRs (#159)
1 parent a8ec27b commit f62cbc5

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check the Docker image builds for a PR
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check_build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
-
11+
name: Checkout github repository
12+
uses: actions/checkout@v6
13+
-
14+
name: Setup Docker buildx
15+
uses: docker/setup-buildx-action@v3
16+
-
17+
name: Set pull request build arguments
18+
id: pr_meta
19+
run: |
20+
appGitRef=develop
21+
appAddSha=true
22+
23+
echo "appGitRef=$appGitRef" >> "$GITHUB_OUTPUT"
24+
echo "appAddSha=$appAddSha" >> "$GITHUB_OUTPUT"
25+
-
26+
name: Build Docker image
27+
uses: docker/build-push-action@v6
28+
with:
29+
context: .
30+
platforms: linux/amd64
31+
build-args: |
32+
VERSION_PHP=8.4
33+
VERSION_COMPOSER=lts
34+
APP_GH_REF=${{ steps.pr_meta.outputs.appGitRef }}
35+
APP_GH_ADD_SHA=${{ steps.pr_meta.outputs.appAddSha }}
36+
load: false
37+
push: false

0 commit comments

Comments
 (0)