Skip to content

Commit dce6899

Browse files
committed
test docker build on branch push and prs
1 parent f22536a commit dce6899

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/docker-build.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: docker-build
22
on:
33
push:
4-
tags:
5-
- '*'
4+
pull_request:
65
workflow_dispatch:
76
jobs:
87
docker-build:
@@ -20,4 +19,11 @@ jobs:
2019
registry: ghcr.io
2120
username: ${{ github.actor }}
2221
password: ${{ secrets.GITHUB_TOKEN }}
23-
- run: make docker-push ${{ matrix.params }}
22+
if: startsWith(github.ref, 'refs/tags/')
23+
- run: |
24+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
25+
echo "MAKE_ACTION=docker-push" >> $GITHUB_ENV
26+
else
27+
echo "MAKE_ACTION=docker-test" >> $GITHUB_ENV
28+
fi
29+
- run: make "$MAKE_ACTION" ${{ matrix.params }}

0 commit comments

Comments
 (0)