Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 01b0431

Browse files
committed
Update CI to build codeql-learninglab-check too
1 parent 912be8e commit 01b0431

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

courses/cpp/ctf-segv/image/test.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ set -e
66
set -x
77

88
TMP=$PWD/tmp
9+
# Extract the expected parent tag from course Dockerfile
10+
PARENT_TAG=$(head -n 1 Dockerfile | awk -F ' ' '{print $2}')
911
TAG=ci-test
1012

11-
docker login docker.pkg.github.com -u github-actions -p ${GITHUB_TOKEN}
13+
# Build codeql-learninglab-check
14+
docker build -t $PARENT_TAG ../../../../codeql-learninglab-check
1215

16+
# Build course image
1317
docker build -t $TAG .
1418

15-
19+
# Prepare temporary folder to mount into docker
1620
mkdir -p $TMP
1721
cp -R ../answers $TMP/answers
22+
echo "{}" > $TMP/event.json
1823

19-
# Create event file
20-
cat <<EOT > tmp/event.json
21-
{
22-
}
23-
EOT
24-
24+
# Run docker image
2525
docker run -i \
2626
-e GITHUB_EVENT_NAME=push \
2727
-e GITHUB_EVENT_PATH=/opt/tmp/event.json \
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
{
2-
}
1+
{}

0 commit comments

Comments
 (0)