Skip to content

Commit 322c810

Browse files
author
Vicente Herrera
committed
Makefile target for testing GH actions
1 parent 3eaf8c5 commit 322c810

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ check-dotnet:
114114

115115
# -----------------------------------------------------------------------------
116116

117+
test-gh-actions:
118+
@if [ -z "$$(command -v act)" ]; then echo "Requires act command installed" ; exit -1 ; fi
119+
act workflow_dispatch -n -e ./test/test-gh-event.json
120+
121+
# -----------------------------------------------------------------------------
122+
117123
build-image:
118124
docker build ${IMAGE_DIR} -f ${IMAGE_DOCKERFILE} \
119125
-t ${DOCKERHUB_ORG}/${IMAGE}:latest \

test/test-gh-event.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"pull_request": {
3+
"head": {
4+
"ref": "sample-head-ref",
5+
"sha": "50524bcd2d8c8aeb5e0b21b0731cb945372e7792",
6+
"user": {
7+
"login": "sample-username"
8+
}
9+
},
10+
"title": "Sample title",
11+
"base": {
12+
"ref": "sample-base-ref"
13+
}
14+
},
15+
"release": {
16+
"tag_name": "v1.2.1"
17+
}
18+
}

0 commit comments

Comments
 (0)