Skip to content

Commit

Permalink
Makefile target for testing GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicente Herrera committed Nov 2, 2020
1 parent 3eaf8c5 commit 322c810
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ check-dotnet:

# -----------------------------------------------------------------------------

test-gh-actions:
@if [ -z "$$(command -v act)" ]; then echo "Requires act command installed" ; exit -1 ; fi
act workflow_dispatch -n -e ./test/test-gh-event.json

# -----------------------------------------------------------------------------

build-image:
docker build ${IMAGE_DIR} -f ${IMAGE_DOCKERFILE} \
-t ${DOCKERHUB_ORG}/${IMAGE}:latest \
Expand Down
18 changes: 18 additions & 0 deletions test/test-gh-event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"pull_request": {
"head": {
"ref": "sample-head-ref",
"sha": "50524bcd2d8c8aeb5e0b21b0731cb945372e7792",
"user": {
"login": "sample-username"
}
},
"title": "Sample title",
"base": {
"ref": "sample-base-ref"
}
},
"release": {
"tag_name": "v1.2.1"
}
}

0 comments on commit 322c810

Please sign in to comment.