Last active
December 2, 2022 20:23
-
-
Save ebal/b0333f9c7e5378bb95a395b3cba623d7 to your computer and use it in GitHub Desktop.
Run GitLab-Runner on your system for local builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This will be the directory to save our artifacts | |
TEMPDIR=$(mktemp -p . -d) | |
# You can choose to run a different job | |
[[ -z "$1" ]] && JOB="run-build" || JOB="$1" | |
# GitLab Runner - docker | |
gitlab-runner exec docker \ | |
--docker-dns=1.1.1.1 \ | |
--docker-volumes="$PWD/${TEMPDIR}":/builds:rw \ | |
"${JOB}" | |
# Fix perms in artifacts directory | |
sudo chown -R "$(id -u):$(id -g)" "${TEMPDIR}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment