Compare commits

...
182 Commits
Author SHA1 Message Date
Marcus Young 2991edd770 [Automated 🤖 ] Bump to version 2.280.1 2021-08-04 12:40:12 -05:00
myoung34andGitHub 70cfc22566 Merge pull request #133 from joeyparrish/fix-chmod
Fix failing chmod on docker-compose on arm
2021-08-04 11:33:42 -05:00
myoung34andGitHub 00824687a7 Merge pull request #132 from joeyparrish/install-python2
Add python2 to base image
2021-08-04 11:31:14 -05:00
Joey Parrish 746ef939c5 Fix failing chmod on docker-compose on arm
Since docker-compose is not downloaded on arm, the chmod command fails
there.  Moving it inside the previous command, after curl, ensures it
only runs when it should.
2021-08-04 09:31:05 -07:00
Joey Parrish 30ff3b9560 Add python2 to base image
Since GitHub Actions environments include python2, this improves
compatibility for the docker image.
2021-08-04 08:55:21 -07:00
myoung34andGitHub 69daab6ad2 Merge pull request #127 from joeyparrish/comment-git-source-build
Add a comment about why git is built from source
2021-08-03 16:42:30 -05:00
Joey Parrish e60f5986bb Add a comment about why git is built from source
Closes #125
2021-08-03 14:39:46 -07:00
Marcus Young 29cbe17895 [Automated 🤖 ] Bump to version 2.280.0 2021-08-03 10:35:37 -05:00
myoung34andGitHub b4ba78cd21 Merge pull request #124 from khancyr/patch-1
Installing jq once is enough
2021-07-30 16:56:29 -05:00
Pierre KancirandGitHub d2d66f3d22 Installing jq once is enough
duplicate jq in apt-get install
2021-07-30 23:38:21 +02:00
Marcus Young 5995ad0f01 Simplify runner reusage, add some output to show logic. Fix readme 2021-07-22 21:15:31 -05:00
myoung34andGitHub fb255ab34b Merge pull request #117 from NickVeld/runner-reusage
Runner reusage
2021-07-22 20:49:32 -05:00
Marcus Young 7d14c7aedd [Automated 🤖 ] Bump to version 2.279.0 2021-07-21 10:58:32 -05:00
Marcus Young a01a429a16 Set up base to build on base yml changes 2021-07-21 09:48:30 -05:00
myoung34andGitHub d19d7c4537 Merge pull request #123 from Niek/master
Add Debian bullseye/sid support
2021-07-21 09:26:07 -05:00
Niek van der MaasandGitHub a096478374 Fix bullseye link 2021-07-21 15:19:36 +01:00
58ee5ef39f Update archs
Co-authored-by: Julian Groß  <julian.g@posteo.de>
2021-07-21 11:43:02 +01:00
c3ca3aee45 Uodate archs
Co-authored-by: Julian Groß  <julian.g@posteo.de>
2021-07-21 11:42:27 +01:00
9e8f4c2c78 Update archs
Co-authored-by: Julian Groß  <julian.g@posteo.de>
2021-07-21 11:42:11 +01:00
Niek van der MaasandGitHub 529d0654e6 Add Bullseye 2021-07-21 08:51:30 +00:00
5b64b6fad7 Add unstable warning
Co-authored-by: Julian Groß  <julian.g@posteo.de>
2021-07-21 09:48:54 +01:00
Niek van der MaasandGitHub f0f4f7d8bc Added fail-fast false 2021-07-21 08:47:52 +00:00
Niek van der MaasandGitHub 0015ccd295 Add Debian sid 2021-07-21 07:26:28 +00:00
myoung34andGitHub a976891559 Merge pull request #122 from dkaoster/debian-buster-armv7
Add Debian Buster armv7
2021-07-19 16:08:24 -05:00
Daniel Kao c210772313 Add Debian Buster armv7 2021-07-19 14:03:19 -07:00
myoung34andGitHub ef0bc0645e Merge pull request #121 from BretFisher/patch-1
add more info to docker warning to README
2021-07-16 16:16:14 -05:00
Bret FisherandGitHub 91fb9c4fd6 add more info to docker warning 2021-07-16 17:13:32 -04:00
myoung34andGitHub 5eb1ede626 Merge pull request #119 from JulianGro/debian_buster
Add Debian Buster
2021-07-15 14:52:40 -05:00
Julian Groß 6dbc298ab4 Don't use gnupg-agent transitional package as it is no longer needed 2021-07-15 20:48:31 +02:00
Julian Groß 03aebc7810 Merge remote-tracking branch 'refs/remotes/origin/master'
Conflicts:
	.github/workflows/base.yml
	.github/workflows/deploy.yml
	.github/workflows/release.yml
	README.md
2021-07-15 20:46:39 +02:00
NickVeld 20af46178d entrypoint: "return" -> "if-else" logic 2021-07-15 19:38:43 +03:00
myoung34andGitHub 9181c228fd Merge pull request #120 from myoung34/remove_xenial
Remove Xenial (past EOL)
2021-07-15 10:02:26 -05:00
Marcus Young 12b1b33f98 Remove Xenial (past EOL) 2021-07-15 10:02:11 -05:00
Julian Groß 86edf34f33 Go back to transitional package for xenial 2021-07-08 15:27:05 +02:00
Julian Groß 0d7ab6ad6b Download the right files for debian buster. 2021-07-08 08:07:04 +02:00
Julian Groß 7fc53eaa8c Switch from transitional package gnupg-agent to gpg-agent.
Install gnupg as it is needed for apt-key.
2021-07-08 07:58:46 +02:00
NickVeld d51a7b1fdd entrypoint: SC2068 fixed, func name fixed 2021-07-07 17:16:58 +03:00
NickVeld c0ed88f355 README: CONFIGURED_ACTIONS_RUNNER_FILES_DIR definition redesign 2021-07-07 17:15:25 +03:00
Julian Groß aa150eb6b2 Add Debian Buster 2021-07-06 23:56:20 +02:00
NickVeld 564b04aace entrypoint: fi remove 2021-07-01 08:21:07 +03:00
NickVeld f0b31cfa18 entrypoint: explicit set with default, command exec into another func 2021-07-01 08:15:18 +03:00
NickVeld 9e991ad064 README: extract CONFIGURED_ACTIONS_RUNNER_FILES_DIR in example 2021-07-01 08:11:49 +03:00
NickVeld 7256a0acb5 shellcheck passing 2021-06-27 06:31:01 +03:00
NickVeld f06920ae43 README: variable and example for runner reusage 2021-06-25 06:00:09 +03:00
NickVeld ae1dfe0585 Dockerfile, entrypoint: runner-reusage base 2021-06-25 05:36:26 +03:00
myoung34andGitHub 30c4470861 Merge pull request #115 from nipeharefa/fix/image-name
fix: image name
2021-06-12 06:56:21 -05:00
Nipe Setiawan Harefa 57580c131b fix image name 2021-06-12 18:37:44 +07:00
myoung34andGitHub db197d1475 Merge pull request #114 from chrisedebo/patch-1
Update README.md
2021-06-11 09:13:15 -05:00
Chris NicelandGitHub 92c01bb28b Update README.md
Typo correction
2021-06-11 15:09:36 +01:00
Marcus Young fb4f85cf74 Deprecate ORG_RUNNER 2021-06-03 09:33:03 -05:00
Marcus Young 839e0e0397 Remove eoan from readme 2021-06-03 09:27:52 -05:00
myoung34andGitHub b76d3b8a2a Merge pull request #111 from jakubstefan/enterprise-scope
Add compatibility with enterprise-wide runners
2021-06-03 09:26:04 -05:00
Lucas Santisteban 856296f324 Select scope in a single variable
The backwards compatibility with ORG_RUNNER is ensured. If
RUNNER_SCOPE is present, it overrides what is imposed by ORG_RUNNER.
2021-06-01 11:32:11 +02:00
Lucas Santisteban e4a4891065 Add compatibility with enterprise-scoped runner
https://docs.github.com/en/enterprise-server@2.22/rest/reference/enterprise-admin#create-a-registration-token-for-an-enterprise
2021-05-14 20:19:02 +02:00
Marcus Young 7981379307 Feat: add -e to install_actions in case the install process fails
Resolves #110
2021-04-22 08:40:40 -05:00
Marcus Young 8bb6f8fbdc [Automated 🤖 ] Bump to version 2.278.0 2021-04-16 10:57:15 -05:00
myoung34andGitHub 389af18d80 Merge pull request #107 from nipeharefa/add-env
Add access token at env kube
2021-04-11 07:55:23 -05:00
Nipe Setiawan Harefa 18763f65a6 add access token at env kube 2021-04-11 19:04:45 +07:00
myoung34andGitHub 48446fa0eb Merge pull request #100 from myoung34/docker_compose_arm
Dont install broken docker-compose on ARM
2021-03-23 07:42:23 -05:00
myoung34andGitHub 808655bf8b Merge pull request #101 from myoung34/optional_deregistration
Add support for optional deregistration via DISABLE_AUTOMATIC_DEREGISTRATION flag
2021-03-23 07:32:33 -05:00
Marcus Young 7592c0e2c6 Add ability to override command in entrypoint 2021-03-23 07:31:27 -05:00
Marcus Young 6090cb38f9 Add support for optional deregistration via DISABLE_AUTOMATIC_DEREGISTRATION flag 2021-03-23 06:01:37 -05:00
Marcus Young d74f9103bf Dont install broken docker-compose on ARM 2021-03-23 05:50:49 -05:00
Marcus Young b22391ffca Add information about docker limitations 2021-03-23 05:16:04 -05:00
myoung34andGitHub e23a139a12 Merge pull request #93 from egyptianbman/patch-1
Install zstd
2021-03-11 05:44:19 -06:00
Beshoy GirgisandGitHub ff99e43a75 Install zstd
The following is printed in the debug log:
```
##[debug]Checking zstd --version
##[debug]Unable to locate executable file: zstd. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
```
2021-03-11 00:17:29 -06:00
myoung34andGitHub 174aeb3258 Merge pull request #89 from A-styler/patch-1
Merge layers
2021-03-02 18:55:02 -06:00
Dmitry TolstoyandGitHub 05609758f3 Merge layers
We can merge layers for less image size
2021-03-03 03:43:55 +03:00
myoung34andGitHub a1dd5f842d Merge pull request #88 from myoung34/awscliv2
Add awscliv2
2021-02-28 18:26:52 -06:00
Marcus Young 1932e3375b Add awscliv2 2021-02-28 18:24:56 -06:00
myoung34andGitHub 74ecb5a404 Merge pull request #82 from jonico/patch-1
Add your project to awesome-runners list
2021-02-16 09:46:23 -06:00
Johannes NicolaiandGitHub 14f96a18ff Add your project to awesome-runners list 2021-02-16 16:34:45 +01:00
Marcus Young ee685078f0 [Automated 🤖 ] Bump to version 2.277.1 2021-02-09 13:54:46 -06:00
Marcus Young d206b12c7e [Automated 🤖 ] Bump to version 2.277.0 2021-02-09 12:37:30 -06:00
Marcus Young d25b2c40aa Add more info to README about default value of GITHUB_HOST env var 2021-02-01 12:37:37 -06:00
myoung34andGitHub a6c246002d Merge pull request #81 from kdihalas/master
Add support for github enterprise
2021-02-01 12:26:17 -06:00
Kostas Dichalas 8a6b399cbf fix README 2021-02-01 18:09:11 +00:00
Kostas Dichalas 712198c4ae add support for Github Enterprise 2021-02-01 18:08:23 +00:00
Marcus Young 1c77e52852 Bump retry timeout to 2h 2021-01-26 20:31:48 -06:00
Marcus Young 3214ffcbd2 Wrap docker buildx build into a retry action 2021-01-24 20:16:36 -06:00
Marcus Young 811526bd09 [Automated 🤖 ] Bump to version 2.276.1 2021-01-21 13:33:04 -06:00
Marcus Young df4aafa18c [Automated 🤖 ] Bump to version 2.276.0 2021-01-15 08:26:59 -06:00
Marcus Young 06b9efcab8 [Automated 🤖 ] Bump to version 2.276.0 2021-01-15 08:24:53 -06:00
Marcus Young 8480c956b2 [Automated 🤖 ] Bump to version 2.276.0 2021-01-14 13:02:44 -06:00
myoung34andGitHub 6137ccae83 Merge pull request #78 from nstdio/locale
Add locale in Dockerfile.base
2020-12-27 07:59:07 -06:00
Edgar Asatryan 661a1824d1 Add locale in Dockerfile.base 2020-12-27 17:13:14 +04:00
myoung34andGitHub 54d513c5c7 Merge pull request #76 from Mongey/patch-1
Update nomad example
2020-12-17 21:09:33 -06:00
Conor MongeyandGitHub 046e3288a9 Update nomad example 2020-12-18 03:04:04 +00:00
Marcus Young 8e534f1b4a [Automated 🤖 ] Bump to version 2.275.1 2020-12-14 15:42:30 -06:00
Marcus Young b1dced691a Hotfix: remove space in TAG env var 2020-12-14 10:31:00 -06:00
Marcus Young c9946b6b31 [Automated 🤖 ] Bump to version 2.275.0 2020-12-14 10:21:11 -06:00
Marcus Young ac17cca755 Attempt trying to fix set-env disabling: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ 2020-11-17 09:58:35 -06:00
Marcus Young bb19030a73 [Automated 🤖 ] Bump to version 2.274.2 2020-11-16 07:40:31 -06:00
Marcus Young 6213d66bcd [Automated 🤖 ] Bump to version 2.274.1 2020-11-09 08:30:50 -06:00
Marcus Young 1d5a155cc2 [Automated 🤖 ] Bump to version 2.274.0 2020-11-05 10:49:01 -06:00
Marcus Young a12ceeb0dd [Automated 🤖 ] Bump to version 2.274.0 2020-11-05 09:58:57 -06:00
Marcus Young ca70d18293 [Automated 🤖 ] Bump to version 2.274.0 2020-11-05 09:44:09 -06:00
myoung34andGitHub 06d8f4625d Merge pull request #71 from morihaya/readme-patch
fix: Kubernetes sample in README
2020-11-03 08:52:00 -06:00
morihaya a1281ef45c fix: Kubernetes sample in README 2020-11-03 23:07:17 +09:00
Marcus Young 9201778fad [Automated 🤖 ] Bump to version 2.273.6 2020-11-02 13:29:29 -06:00
Marcus Young bff29ac494 Revert docker-build-push action until a solution is found for it re-cloning and removing changes to the Dockerfile 2020-11-02 10:27:16 -06:00
Marcus Young e4be4ad005 Debug workflow 2020-11-02 09:29:31 -06:00
myoung34andGitHub 10017089e9 Merge pull request #69 from myoung34/platforms
Fix supported platforms
2020-11-02 09:23:43 -06:00
Marcus Young fa1de4a811 Fix supported platforms 2020-11-02 09:23:27 -06:00
myoung34andGitHub e17bf4910b Merge pull request #68 from myoung34/outputs
Use step outputs instead of env vars
2020-11-02 09:16:57 -06:00
Marcus Young d72e997be8 Use step outputs instead of env vars 2020-11-02 09:16:34 -06:00
myoung34andGitHub 76b0b01565 Merge pull request #67 from myoung34/syntax
Fix interpolation syntax
2020-11-02 08:53:20 -06:00
Marcus Young 42929b8d14 Fix interpolation syntax 2020-11-02 08:53:05 -06:00
myoung34andGitHub 594be32236 Merge pull request #66 from myoung34/fix_token
Fix user/pass
2020-11-02 08:49:34 -06:00
Marcus Young 952fa6436d Fix user/pass 2020-11-02 08:48:40 -06:00
myoung34andGitHub df396afc51 Merge pull request #65 from damacus/workflow/deploy
Update deploy & release workflows to use Docker Actions
2020-11-02 08:42:27 -06:00
Dan Webb 5ab9c36182 Update deploy & release workflows to use Docker Actions 2020-11-02 14:38:21 +00:00
myoung34andGitHub 123a06f31f Merge pull request #64 from damacus/base/update-workflow
Updates the base Dockerfile workflow to use Docker's GitHub Action
2020-11-02 08:36:47 -06:00
Dan Webb fa889767b2 Updates the base Dockerfile workflow to use Docker's GitHub Action
We now use the newer docker setup & build actions.
2020-11-02 14:02:35 +00:00
myoung34andGitHub 04f0651b9f Merge pull request #62 from damacus/configure/runner-group
Add the option to configure the RUNNER_GROUP on startup
2020-10-23 04:58:00 -05:00
myoung34andGitHub b7f8c8ffe7 Merge pull request #63 from damacus/update/base
Update docker-compose & git
2020-10-23 04:56:42 -05:00
Dan Webb bb7c15e231 Update docker-compose & git 2020-10-23 09:56:05 +01:00
Dan Webb bdfbe31f59 Add the option to configure the RUNNER_GROUP on startup
This adds the RUNNER_GROUP variable to configure which group the runner
is added to. Defaults to the "Default" runner group.
2020-10-23 09:43:24 +01:00
myoung34andGitHub 3e7ea713b6 Merge pull request #58 from Jorgen1040/readme-fix
Removed build from example docker-compose file
2020-10-09 18:10:37 -05:00
Jorgen1040 731f9b4d35 Removed build from example docker-compose file 2020-10-10 01:05:24 +02:00
myoung34andGitHub 6171bd339f Merge pull request #57 from nberrington-cloudian/support-setup-python
Add support for the setup-python action
2020-10-05 06:00:46 -05:00
Neil Berrington 8b2f017591 Add support for the setup-python action 2020-10-05 10:14:23 +01:00
Marcus Young 5396e6c1d7 [Automated 🤖 ] Bump to version 2.273.5 2020-10-02 11:05:34 -05:00
myoung34andGitHub 403f37aa99 Merge pull request #56 from pablosproject/master
Add openssh client
2020-09-28 09:46:07 -05:00
Paolo Tagliani 74563f9602 add openssh client 2020-09-28 16:35:47 +02:00
Marcus Young 8f5f35b0c6 Remove armv7 for focal because docker-ce deb is inconsistent 2020-09-18 09:03:13 -05:00
Marcus Young ad54eac81f Add --allow-unauthenticated to docker for armv7/arm64 reasons 2020-09-18 08:09:46 -05:00
Marcus Young 86a40ab6f5 Update dumb-init to work with special consideration for xenial (and dropped support for xenial armv7) 2020-09-18 07:56:17 -05:00
Marcus Young 42aca0e18c Add notes column to readme 2020-09-18 06:52:03 -05:00
Marcus Young 844b04fea7 Add specific apt-key import for docker 2020-09-18 06:49:25 -05:00
myoung34andGitHub 2af8cebe4d Merge pull request #54 from navarroaxel/patch-1
Fix Docker apt source for focal
2020-09-18 06:34:42 -05:00
Axel NavarroandGitHub bf8100e41f Fix Docker apt source for focal 2020-09-18 07:45:35 -03:00
myoung34andGitHub bacc2b46e1 Merge pull request #53 from myoung34/remove_eoan
remove eoan
2020-09-18 05:21:29 -05:00
Marcus Young 88bfb9c06c remove eoan 2020-09-18 05:18:42 -05:00
myoung34andGitHub c25bf7c2ed Merge pull request #52 from hintmedia/fix-deregistration-with-dumb-init
Fix deregistration with dumb-init
2020-09-17 17:33:42 -05:00
Benjamin Wood 18572ff629 Fix deregistration with dumb-init
This resolves the issue reported in #34 where deregistration fails
because docker is not passing SIGTERM to the entrypoint.
2020-09-17 15:27:41 -07:00
Marcus Young 65dce5c979 Bump to version 2.273.4 2020-09-17 13:25:30 -05:00
Marcus Young a8485e8339 Bump to version 2.273.3 2020-09-16 10:28:53 -05:00
Marcus Young 93357a7d27 Bump to version 2.273.2 2020-09-14 13:18:43 -05:00
Marcus Young f15dd52add Bump to version 2.273.2 2020-09-14 12:26:51 -05:00
Marcus Young c998ea371d Bump to version 2.273.1 2020-09-08 12:39:48 -05:00
Marcus Young f6ad6ef8a2 Add info on focal 2020-08-19 15:33:20 -05:00
Marcus Young e3231ab205 Force rebuild of base ami 2020-08-19 13:53:51 -05:00
Marcus Young 9c58db7a57 Remove arm/v7 from focal builds 2020-08-19 12:54:44 -05:00
Marcus Young c03e9ebf66 Rebuild base 2020-08-19 12:11:25 -05:00
myoung34andGitHub 11f175b8f9 Merge pull request #47 from damacus/add/focal
Build Focal (20.04) images
2020-08-19 12:08:11 -05:00
myoung34andGitHub b5291c758b Merge pull request #48 from myoung34/hotfix/org_runner_token_default_url
add org runner for runner token
2020-08-19 12:06:16 -05:00
Marcus Young 059387c11c add org runner for runner token 2020-08-19 12:05:44 -05:00
Dan Webb db30f47307 Build Focal (20.04) images 2020-08-19 16:26:18 +01:00
myoung34andGitHub 4e4cffbb08 Merge pull request #46 from damacus/compose-version
Update the docker-compose version
2020-08-19 10:23:02 -05:00
Dan Webb a99dfa793e Update the docker-compose version
Updates the docker-compose version from 1.25.4 to 1.26.2
The environment variable makes it easier install a newer version
2020-08-19 16:20:07 +01:00
Marcus Young bdc848c9a0 Bump to version 2.273.0 2020-08-19 09:53:13 -05:00
myoung34andGitHub 26ed21bcfc Merge pull request #44 from divlv/master
Notes regarding PAT scopes and privileges.
2020-08-06 13:52:32 -05:00
Dmitrijs ZaharovsandGitHub 5357aa869c Notes regarding PAT scopes and privileges. 2020-08-06 21:44:12 +03:00
Marcus Young d68d9f6fc8 Bump to version 2.272.0 2020-07-29 15:38:28 -04:00
myoung34andGitHub abd5a962b5 Create SECURITY.md 2020-07-28 10:55:08 -05:00
Marcus Young 7ccb4ed034 Update readme 2020-07-10 10:05:59 -05:00
myoung34andGitHub 531dbeab92 Merge pull request #40 from myoung34/actions_add
Add all workflows back
2020-07-06 07:51:16 -05:00
Marcus Young 814b400daf Add all workflows back 2020-07-06 07:50:48 -05:00
myoung34andGitHub c569803c05 Merge pull request #39 from myoung34/actions_remove
Trying fix for github actions cron mod
2020-07-06 07:49:44 -05:00
Marcus Young 57fd528ae9 Trying fix for github actions cron mod 2020-07-06 07:49:06 -05:00
Marcus Young fad3705687 Add scheduled builders 2020-07-05 20:18:54 -05:00
Marcus Young dbf917bdc9 Bump to version 2.267.1 2020-06-30 21:26:33 -05:00
Marcus Young 15bc90d41e Dummy commit to force latest rebuild 2020-06-29 15:27:35 -05:00
myoung34andGitHub 5f16e6caf2 Merge pull request #37 from Kreelio/feat/add-unzip
feat: add unzip to docker image
2020-06-29 13:29:23 -05:00
myoung34andGitHub c0b9c0300e Merge pull request #36 from aslafy-z/patch-1
fix(docs): quote boolean in docker-compose example
2020-06-29 13:29:00 -05:00
ZadkielandGitHub 4dc6700829 feat: add unzip to docker image 2020-06-29 20:19:31 +02:00
ZadkielandGitHub 3e492d23bd fix(docs): quote boolean in docker-compose example 2020-06-29 20:02:28 +02:00
Marcus Young d2f686e857 Bump to version 2.267.0 2020-06-23 13:42:18 -05:00
Marcus Young 18198af872 Fix docs a bit 2020-06-15 07:20:45 -05:00
myoung34andGitHub 03bd34f460 Merge pull request #31 from myoung34/develop
Optimize base
2020-06-12 09:26:06 -05:00
Marcus Young 210dcf0f84 Optimize base 2020-06-12 08:43:34 -05:00
Kevin JonesandGitHub fd49993401 Added RUNNER_WORKDIR mounting readme note
Fix for https://github.com/myoung34/docker-github-actions-runner/issues/27#issue-630231157
2020-06-03 12:22:58 -07:00
Marcus Young 1e12527d1b Fix deprecation warning for buildx-version 2020-05-31 15:17:45 -05:00
Marcus Young 7648aa4205 Add basic support for SIGTERM handling 2020-05-27 06:46:57 -05:00
Marcus Young 5c2992ba3f Fix _PROTO when repo_url not given 2020-05-27 06:13:53 -05:00
Marcus Young f0db7fd111 Actions hates me 2020-05-26 17:53:36 -05:00
Marcus Young 01aa45246c Add awscli into base 2020-05-26 17:52:36 -05:00
Marcus Young 3d44159889 Unset ACCESS_TOKEN|RUNNER_TOKEN after configure 2020-05-23 06:58:05 -05:00
Marcus Young 258480828a Add random default name with prefix 2020-05-21 16:26:51 -05:00
Marcus Young 48ee0c82d4 Bump to version 2.263.0 2020-05-21 15:43:07 -05:00
Marcus Young a3b5dc873d Add automatic release creation 2020-05-13 13:55:09 -05:00
13 changed files with 469 additions and 133 deletions
+35 -11
View File
@@ -3,9 +3,13 @@ on:
push:
paths:
- Dockerfile.base
- .github/workflows/base.yml
branches:
- master
- develop
schedule:
- cron: '0 22 * * *'
jobs:
ubuntu_base_latest_deploy:
@@ -14,30 +18,35 @@ jobs:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile.base -t ${ORG}/github-runner-base:latest --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile.base -t ${ORG}/github-runner-base:latest --output "type=image,push=true" --platform linux/amd64,linux/arm64 .
ubuntu_base_bionic_deploy:
runs-on: ubuntu-latest
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Copy Dockerfile
@@ -45,24 +54,39 @@ jobs:
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile.base.ubuntu-bionic -t ${ORG}/github-runner-base:ubuntu-bionic --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
ubuntu_base_xenial_deploy:
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile.base.ubuntu-bionic -t ${ORG}/github-runner-base:ubuntu-bionic --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
debian_base_deploy:
runs-on: ubuntu-latest
strategy:
matrix:
release: [buster, bullseye, sid]
fail-fast: false
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Copy Dockerfile
run: cp Dockerfile.base Dockerfile.base.ubuntu-xenial; sed -i.bak 's/FROM.*/FROM ubuntu:xenial/' Dockerfile.base.ubuntu-xenial
run: cp Dockerfile.base Dockerfile.base.debian-${{ matrix.release }}; sed -i.bak 's/FROM.*/FROM debian:${{ matrix.release }}/' Dockerfile.base.debian-${{ matrix.release }}
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile.base.ubuntu-xenial -t ${ORG}/github-runner-base:ubuntu-xenial --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile.base.debian-${{ matrix.release }} -t ${ORG}/github-runner-base:debian-${{ matrix.release }} --output "type=image,push=true" --platform linux/amd64,linux/arm64,linux/arm/v7 .
+33 -11
View File
@@ -7,6 +7,8 @@ on:
branches:
- master
- develop
schedule:
- cron: '59 23 * * *'
jobs:
ubuntu_latest_deploy:
@@ -15,30 +17,35 @@ jobs:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile -t ${ORG}/github-runner:latest --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile -t ${ORG}/github-runner:latest --output "type=image,push=true" --platform linux/amd64,linux/arm64 .
ubuntu_bionic_deploy:
runs-on: ubuntu-latest
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Copy Dockerfile
@@ -46,24 +53,39 @@ jobs:
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile.ubuntu-bionic -t ${ORG}/github-runner:ubuntu-bionic --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
ubuntu_xenial_deploy:
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile.ubuntu-bionic -t ${ORG}/github-runner:ubuntu-bionic --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
debian_deploy:
runs-on: ubuntu-latest
strategy:
matrix:
release: [buster, bullseye, sid]
fail-fast: false
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Copy Dockerfile
run: cp Dockerfile Dockerfile.ubuntu-xenial; sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:ubuntu-xenial/" Dockerfile.ubuntu-xenial
run: cp Dockerfile Dockerfile.debian-${{ matrix.release }}; sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:debian-${{ matrix.release }}/" Dockerfile.debian-${{ matrix.release }}
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile.ubuntu-xenial -t ${ORG}/github-runner:ubuntu-xenial --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile.debian-${{ matrix.release }} -t ${ORG}/github-runner:debian-${{ matrix.release }} --output "type=image,push=true" --platform linux/amd64,linux/arm64,linux/arm/v7 .
+53 -17
View File
@@ -1,47 +1,67 @@
name: GitHub Actions Runner in Docker - Release
on:
push:
paths-ignore:
- Dockerfile.base
- README.md
tags:
- '*'
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
ubuntu_latest_tag:
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: get version
run: echo ::set-env name=TAG::${GITHUB_REF#refs/tags/}
run: echo 'TAG='${GITHUB_REF#refs/tags/} >> $GITHUB_ENV
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile -t ${ORG}/github-runner:${TAG} --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile -t ${ORG}/github-runner:${TAG} --output "type=image,push=true" --platform linux/amd64,linux/arm64 .
ubuntu_bionic_tag:
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: get version
run: echo ::set-env name=TAG::${GITHUB_REF#refs/tags/}
run: echo 'TAG='${GITHUB_REF#refs/tags/} >> $GITHUB_ENV
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Copy Dockerfile
@@ -49,26 +69,42 @@ jobs:
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile.ubuntu-bionic -t ${ORG}/github-runner:${TAG}-ubuntu-bionic --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
ubuntu_xenial_tag:
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile.ubuntu-bionic -t ${ORG}/github-runner:${TAG}-ubuntu-bionic --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
debian_tag:
runs-on: ubuntu-latest
strategy:
matrix:
release: [buster, bullseye, sid]
fail-fast: false
needs: create-release
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: get version
run: echo ::set-env name=TAG::${GITHUB_REF#refs/tags/}
run: echo 'TAG='${GITHUB_REF#refs/tags/} >> $GITHUB_ENV
- name: Get GitHub organization or user
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY})
run: echo 'ORG='$(dirname ${GITHUB_REPOSITORY}) >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Copy Dockerfile
run: cp Dockerfile Dockerfile.ubuntu-xenial; sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:ubuntu-xenial/" Dockerfile.ubuntu-xenial
run: cp Dockerfile Dockerfile.debian-${{ matrix.release }}; sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:debian-${{ matrix.release }}/" Dockerfile.debian-${{ matrix.release }}
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile.ubuntu-xenial -t ${ORG}/github-runner:${TAG}-ubuntu-xenial --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
uses: nick-invision/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 120
command: docker buildx build -f Dockerfile.debian-${{ matrix.release }} -t ${ORG}/github-runner:${TAG}-debian-${{ matrix.release }} --output "type=image,push=true" --platform linux/amd64,linux/arm64,linux/arm/v7 .
+1
View File
@@ -3,6 +3,7 @@ repos:
rev: 1.0.2
hooks:
- id: shell-lint
args: [-e, SC1008]
- repo: https://github.com/stratasan/hadolint-pre-commit
rev: cdefcb096e520a6daa9552b1d4636f5f1e1729cd
hooks:
+1
View File
@@ -0,0 +1 @@
shellcheck 0.7.0
+3
View File
@@ -0,0 +1,3 @@
6/3/2021 (latest)
* `ORG_RUNNER` is now deprecated in favor of `RUNNER_SCOPE`. If you are currently using `ORG_RUNNER` please drop that in favor of `RUNNER_SCOPE="org"`
+8 -3
View File
@@ -2,7 +2,10 @@
FROM myoung34/github-runner-base:latest
LABEL maintainer="myoung34@my.apsu.edu"
ARG GH_RUNNER_VERSION="2.262.1"
ENV AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
RUN mkdir -p /opt/hostedtoolcache
ARG GH_RUNNER_VERSION="2.280.1"
ARG TARGETPLATFORM
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -14,6 +17,8 @@ RUN chmod +x /actions-runner/install_actions.sh \
&& /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} ${TARGETPLATFORM} \
&& rm /actions-runner/install_actions.sh
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
COPY token.sh entrypoint.sh /
RUN chmod +x /token.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/actions-runner/bin/runsvc.sh"]
+36 -14
View File
@@ -1,28 +1,52 @@
FROM ubuntu:eoan
FROM ubuntu:focal
LABEL maintainer="myoung34@my.apsu.edu"
ARG GIT_VERSION="2.26.2"
# TODO: Ubuntu focal (20.04) has git v2.25, but the minimum needed for GitHub
# Actions runners is v2.29. For now, we build git from source. When updating
# to hirsute (21.04) or later, we can remove the instructions to build from
# source in favor of the regular Ubuntu git package.
ARG GIT_VERSION="2.29.0"
ARG DUMB_INIT_VERSION="1.2.2"
ARG DOCKER_KEY="7EA0A9C3F273FCD8"
ENV DOCKER_COMPOSE_VERSION="1.27.4"
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
# hadolint ignore=DL3003
# hadolint ignore=DL3003,DL4001
RUN apt-get update && \
apt-get install -y --no-install-recommends \
awscli \
curl \
tar \
unzip \
apt-transport-https \
ca-certificates \
sudo \
gnupg-agent \
gpg-agent \
gnupg \
software-properties-common \
build-essential \
zlib1g-dev \
zstd \
gettext \
liblttng-ust0 \
libcurl4-openssl-dev \
inetutils-ping \
jq \
&& rm -rf /var/lib/apt/lists/* \
wget \
dirmngr \
openssh-client \
locales \
python3-pip \
python2 \
dumb-init \
&& pip3 install --no-cache-dir awscliv2 \
&& locale-gen en_US.UTF-8 \
&& dpkg-reconfigure locales \
&& c_rehash \
&& cd /tmp \
&& curl -sL https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz -o git.tgz \
@@ -32,13 +56,11 @@ RUN apt-get update && \
&& make \
&& make install \
&& cd / \
&& rm -rf /tmp/git.tgz /tmp/git-${GIT_VERSION}
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
&& [[ $(lsb_release -cs) == "eoan" ]] && ( add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu disco stable" ) || ( add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" )\
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${DOCKER_KEY} \
&& curl -fsSL https://download.docker.com/linux/$(lsb_release -is | awk '{print tolower($0)}')/gpg | apt-key add - \
&& ( add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(lsb_release -is | awk '{print tolower($0)}') $(lsb_release -cs) stable" ) \
&& apt-get update \
&& apt-get install -y docker-ce docker-ce-cli containerd.io --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
&& chmod +x /usr/local/bin/docker-compose
&& apt-get install -y docker-ce docker-ce-cli containerd.io --no-install-recommends --allow-unauthenticated \
&& [[ $(lscpu -J | jq -r '.lscpu[] | select(.field == "Vendor ID:") | .data') == "ARM" ]] && echo "Not installing docker-compose. See https://github.com/docker/compose/issues/6831" || ( curl -sL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose ) \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/*
+136 -38
View File
@@ -1,18 +1,58 @@
Docker Github Actions Runner
============================
[![Docker Pulls](https://img.shields.io/docker/pulls/myoung34/github-runner.svg)](https://hub.docker.com/r/myoung34/github-runner)
[![Docker Pulls](https://img.shields.io/docker/pulls/myoung34/github-runner.svg)](https://hub.docker.com/r/myoung34/github-runner) [![awesome-runners](https://img.shields.io/badge/listed%20on-awesome--runners-blue.svg)](https://github.com/jonico/awesome-runners)
This will run the [new self-hosted github actions runners](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/hosting-your-own-runners).
This has been tested and verified on:
## Notes ##
* x86_64
* armhf
* armv7
* arm64
**NOTE: Only one runner can use the same RUNNER_WORKDIR if it is shared storage.**
### Docker Support ###
Please note that while this runner installs and allows docker, github actions itself does not support using docker from a self hosted runner yet.
For more information:
* https://github.com/actions/runner/issues/406
* https://github.com/actions/runner/issues/367
Also, some GitHub Actions Workflow features, like [Job Services](https://docs.github.com/en/actions/guides/about-service-containers), won't be usable and [will result in an error](https://github.com/myoung34/docker-github-actions-runner/issues/61).
### Docker-Compose on ARM ###
Please note `docker-compose` does not currently work on ARM ([see issue](https://github.com/docker/compose/issues/6831)) so it is not installed on ARM based builds here.
A workaround exists, please see [here](https://github.com/myoung34/docker-github-actions-runner/issues/72#issuecomment-804723656)
## Docker Artifacts ##
| Container Base | Supported Architectures | Tag Regex | Docker Tags | Description | Notes |
| --- | --- | --- | --- | --- | --- |
| ubuntu focal | `x86_64`,`arm64` | `/\d\.\d{3}\.\d+/` | [latest](https://hub.docker.com/r/myoung34/github-runner/tags?page=1&name=latest) | This is the latest build (Rebuilt nightly and on master merges). Tags without an OS name are included. | Tags without an OS name *before* 9/17/2020 are `eoan`. `armv7` support stopped 9/18/2020 due to inconsistent docker-ce packaging |
| ubuntu bionic | `x86_64`,`armv7`,`arm64` | `/\d\.\d{3}\.\d+-ubuntu-bionic/` | [ubuntu-bionic](https://hub.docker.com/r/myoung34/github-runner/tags?page=1&name=ubuntu-bionic) | This is the latest build from bionic (Rebuilt nightly and on master merges). Tags with `-ubuntu-bionic` are included and created on [upstream tags](https://github.com/actions/runner/tags). | |
| debian buster | `x86_64`,`arm64`,`armv7` | `/\d\.\d{3}\.\d+-debian-buster/` | [debian-buster](https://hub.docker.com/r/myoung34/github-runner/tags?page=1&name=debian-buster) | This is the latest build from buster (Rebuilt nightly and on master merges). Tags with `-debian-buster` are included and created on [upstream tags](https://github.com/actions/runner/tags). | |
| debian bullseye | `x86_64`,`arm64`,`armv7` | `/\d\.\d{3}\.\d+-debian-bullseye/` | [debian-bullseye](https://hub.docker.com/r/myoung34/github-runner/tags?page=1&name=debian-bullseye) | This is the latest build from bullseye (Rebuilt nightly and on master merges). Tags with `-debian-bullseye` are included and created on [upstream tags](https://github.com/actions/runner/tags). | Debian Bullseye will be the next stable release of Debian Linux. |
| debian sid | `x86_64`,`arm64`,`admv7` | `/\d\.\d{3}\.\d+-debian-sid/` | [debian-sid](https://hub.docker.com/r/myoung34/github-runner/tags?page=1&name=debian-sid) | This is the latest build from sid (Rebuilt nightly and on master merges). Tags with `-debian-sid` are included and created on [upstream tags](https://github.com/actions/runner/tags). | Debian sid is considered unstable by Debian. |
| ubuntu xenial | `x86_64`,`arm64` | `/\d\.\d{3}\.\d+-ubuntu-xenial/` | [ubuntu-xenial](https://hub.docker.com/r/myoung34/github-runner/tags?page=1&name=ubuntu-xenial) | This is the latest build from xenial (Rebuilt nightly and on master merges). Tags with `-ubuntu-xenial` are included and created on [upstream tags](https://github.com/actions/runner/tags). | This is deprecated as of 7/15/2021 and will no longer receive tags. |
These containers are built via Github actions that [copy the dockerfile](https://github.com/myoung34/docker-github-actions-runner/blob/master/.github/workflows/deploy.yml#L47), changing the `FROM` and building to provide simplicity.
## Environment Variables ##
| Environment Variable | Description |
| --- | --- |
| `RUNNER_NAME` | The name of the runner to use. Supercedes (overrides) `RUNNER_NAME_PREFIX` |
| `RUNNER_NAME_PREFIX` | A prefix for a randomly generated name (followed by a random 13 digit string). You must not also provide `RUNNER_NAME`. Defaults to `github-runner` |
| `ACCESS_TOKEN` | A [github PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) to use to generate `RUNNER_TOKEN` dynamically at container start. Not using this requires a valid `RUNNER_TOKEN` |
| `RUNNER_SCOPE` | The scope the runner will be registered on. Valid values are `repo`, `org` and `ent`. For 'org' and 'enterprise', `ACCESS_TOKEN` is required and `REPO_URL` is unneccesary. If 'org', requires `ORG_NAME`; if 'enterprise', requires `ENTERPRISE_NAME`. Default is 'repo'. |
| `ORG_NAME` | The organization name for the runner to register under. Requires `RUNNER_SCOPE` to be 'org'. No default value. |
| `ENTERPRISE_NAME` | The enterprise name for the runner to register under. Requires `RUNNER_SCOPE` to be 'enterprise'. No default value. |
| `LABELS` | A comma separated string to indicate the labels. Default is 'default' |
| `REPO_URL` | If using a non-organization runner this is the full repository url to register under such as 'https://github.com/myoung34/repo' |
| `RUNNER_TOKEN` | If not using a PAT for `ACCESS_TOKEN` this will be the runner token provided by the Add Runner UI (a manual process). Note: This token is short lived and will change frequently. `ACCESS_TOKEN` is likely preferred. |
| `RUNNER_WORKDIR` | The working directory for the runner. Runners on the same host should not share this directory. Default is '/_work'. This must match the source path for the bind-mounted volume at RUNNER_WORKDIR, in order for container actions to access files. |
| `RUNNER_GROUP` | Name of the runner group to add this runner to (defaults to the default runner group) |
| `GITHUB_HOST` | Optional URL of the Github Enterprise server e.g github.mycompany.com. Defaults to `github.com`. |
| `DISABLE_AUTOMATIC_DEREGISTRATION` | Optional flag to disable signal catching for deregistration. Default is `false`. Any value other than exactly `false` is considered `true`. See [here](https://github.com/myoung34/docker-github-actions-runner/issues/94) |
| `CONFIGURED_ACTIONS_RUNNER_FILES_DIR` | Path to use for runner data. It allows avoiding reregistration each the start of the runner. No default value. |
## Examples ##
@@ -22,14 +62,14 @@ If you're using a RHEL based OS with SELinux, add `--security-opt=label=disable`
### Manual ###
```
# org runner
```shell
# org runner
docker run -d --restart always --name github-runner \
-e REPO_URL="https://github.com/myoung34/repo" \
-e RUNNER_NAME="foo-runner" \
-e RUNNER_TOKEN="footoken" \
-e RUNNER_NAME_PREFIX="myrunner" \
-e ACCESS_TOKEN="footoken" \
-e RUNNER_WORKDIR="/tmp/github-runner-your-repo" \
-e ORG_RUNNER="true" \
-e RUNNER_GROUP="my-group" \
-e RUNNER_SCOPE="org" \
-e ORG_NAME="octokode" \
-e LABELS="my-label,other-label" \
-v /var/run/docker.sock:/var/run/docker.sock \
@@ -41,14 +81,32 @@ docker run -d --restart always --name github-runner \
-e RUNNER_NAME="foo-runner" \
-e RUNNER_TOKEN="footoken" \
-e RUNNER_WORKDIR="/tmp/github-runner-your-repo" \
-e RUNNER_GROUP="my-group" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/github-runner-your-repo:/tmp/github-runner-your-repo \
myoung34/github-runner:latest
```
Or shell wrapper:
Adding the reusage of the registered runner (can be propogated to all other approaches):
```shell
# per repo
docker run -d --restart always --name github-runner \
-e REPO_URL="https://github.com/myoung34/repo" \
-e RUNNER_NAME="foo-runner" \
-e RUNNER_TOKEN="footoken" \
-e RUNNER_WORKDIR="/tmp/github-runner-your-repo" \
-e RUNNER_GROUP="my-group" \
-e CONFIGURED_ACTIONS_RUNNER_FILES_DIR="/actions-runner-files" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/github-runner-your-repo:/tmp/github-runner-your-repo \
-v /tmp/foo:/actions-runner-files \
myoung34/github-runner:latest
```
Shell wrapper:
```shell
function github-runner {
name=github-runner-${1//\//-}
org=$(dirname $1)
@@ -60,33 +118,32 @@ function github-runner {
-e RUNNER_TOKEN="$2" \
-e RUNNER_NAME="linux-${repo}" \
-e RUNNER_WORKDIR="/tmp/github-runner-${repo}" \
-e ORG_RUNNER="true" \
-e ORG_NAME="octokode" \
-e RUNNER_GROUP="my-group" \
-e LABELS="my-label,other-label" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/github-runner-${repo}:/tmp/github-runner-${repo} \
--name $name ${org}/github-runner:${tag}
--name $name myoung34/github-runner:latest
}
github-runner your-account/your-repo AARGHTHISISYOURGHACTIONSTOKEN
github-runner your-account/some-other-repo ARGHANOTHERGITHUBACTIONSTOKEN ubuntu-xenial
github-runner your-account/some-other-repo ARGHANOTHERGITHUBACTIONSTOKEN ubuntu-focal
```
Or `docker-compose.yml`:
```yml
version: '2.3'
services:
worker:
build: .
image: myoung34/github-runner:latest
environment:
REPO_URL: https://github.com/example/repo
RUNNER_NAME: example-name
RUNNER_TOKEN: someGithubTokenHere
RUNNER_WORKDIR: /tmp/runner/work
ORG_RUNNER: true
ORG_NAME: example-github-org
RUNNER_GROUP: my-group
RUNNER_SCOPE: 'repo'
LABELS: linux,x64,gpu
security_opt:
# needed on SELinux systems to allow docker container to manage other docker containers
@@ -94,14 +151,14 @@ services:
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- '/tmp/runner:/tmp/runner'
# note: a quirk of docker-in-docker is that this path
# note: a quirk of docker-in-docker is that this path
# needs to be the same path on host and inside the container,
# docker mgmt cmds run outside of docker but expect the paths from within
```
### Nomad ###
```
```hcl
job "github_runner" {
datacenters = ["home"]
type = "system"
@@ -110,17 +167,21 @@ job "github_runner" {
driver = "docker"
env {
REPO_URL = "https://github.com/your-account/your-repo"
RUNNER_TOKEN = "footoken"
RUNNER_WORKDIR = "/tmp/github-runner-your-repo"
ORG_RUNNER = "true"
ORG_NAME = "octokode"
LABELS = "my-label,other-label"
ACCESS_TOKEN = "footoken"
RUNNER_NAME_PREFIX = "myrunner"
RUNNER_WORKDIR = "/tmp/github-runner-your-repo"
RUNNER_GROUP = "my-group"
RUNNER_SCOPE = "org"
ORG_NAME = "octokode"
LABELS = "my-label,other-label"
}
config {
privileged = true
image = "myoung34/github-runner:latest"
privileged = true
userns_mode = "host"
volumes = [
"/var/run/docker.sock:/var/run/docker.sock",
"/tmp/github-runner-your-repo:/tmp/github-runner-your-repo",
@@ -132,7 +193,7 @@ job "github_runner" {
### Kubernetes ###
```
```yml
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -159,8 +220,10 @@ spec:
- name: runner
image: myoung34/github-runner:latest
env:
- name: ORG_RUNNER
value: true
- name: ACCESS_TOKEN
value: foo-access-token
- name: RUNNER_SCOPE
value: "org"
- name: ORG_NAME
value: octokode
- name: LABELS
@@ -169,12 +232,16 @@ spec:
value: footoken
- name: REPO_URL
value: https://github.com/your-account/your-repo
- name: RUNNER_NAME_PREFIX
value: foo
- name: RUNNER_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: RUNNER_WORKDIR
value: /tmp/github-runner-your-repo
- name: RUNNER_GROUP
value: my-group
volumeMounts:
- name: dockersock
mountPath: /var/run/docker.sock
@@ -184,7 +251,7 @@ spec:
## Usage From GH Actions Workflow ##
```
```yml
name: Package
on:
@@ -204,16 +271,47 @@ jobs:
A runner token can be automatically acquired at runtime if `ACCESS_TOKEN` (a GitHub personal access token) is a supplied. This uses the [GitHub Actions API](https://developer.github.com/v3/actions/self_hosted_runners/#create-a-registration-token). e.g.:
```
```shell
docker run -d --restart always --name github-runner \
-e ACCESS_TOKEN="footoken" \
-e REPO_URL="https://github.com/myoung34/repo" \
-e RUNNER_NAME="foo-runner" \
-e RUNNER_WORKDIR="/tmp/github-runner-your-repo" \
-e ORG_RUNNER="true" \
-e RUNNER_GROUP="my-group" \
-e RUNNER_SCOPE="org" \
-e ORG_NAME="octokode" \
-e LABELS="my-label,other-label" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/github-runner-your-repo:/tmp/github-runner-your-repo \
myoung34/github-runner:latest
```
## Create GitHub personal access token ##
Creating GitHub personal access token (PAT) for using by self-hosted runner make sure the following scopes are selected:
* repo (all)
* admin:org (all) **_(mandatory for organization-wide runner)_**
* admin:enterprise (all) **_(mandatory for enterprise-wide runner)_**
* admin:public_key - read:public_key
* admin:repo_hook - read:repo_hook
* admin:org_hook
* notifications
* workflow
Also, when creating a PAT for self-hosted runner which will process events from several repositories of the particular organization, create the PAT using organization owner account. Otherwise your new PAT will not have sufficient privileges for all repositories.
## Run a runner on enterprise scope ##
```shell
docker run -d --restart always --name github-runner \
-e ACCESS_TOKEN="footoken" \
-e RUNNER_NAME="foo-runner" \
-e RUNNER_WORKDIR="/tmp/github-runner-your-repo" \
-e RUNNER_GROUP="my-group" \
-e RUNNER_SCOPE="enterprise" \
-e ENTERPRISE_NAME="my-enterprise" \
-e LABELS="my-label,other-label" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/github-runner-your-repo:/tmp/github-runner-your-repo \
myoung34/github-runner:latest
```
+23
View File
@@ -0,0 +1,23 @@
## Security
If you believe you have found a security vulnerability, please report it to me as described below.
## Reporting Security Issues
**Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to me directly at [myoung34@my.apsu.edu](mailto:myoung34@my.apsu.edu).
If you'd like to communicate securely, my keybase is [here](https://keybase.io/3vilpenguin)
Please include the requested information listed below (as much as you can provide) to help better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
## Preferred Languages
I prefer all communications to be in English.
+97 -38
View File
@@ -1,49 +1,108 @@
#!/bin/bash
#!/usr/bin/dumb-init /bin/bash
export RUNNER_ALLOW_RUNASROOT=1
export PATH=$PATH:/actions-runner
_RUNNER_NAME=${RUNNER_NAME:-default}
deregister_runner() {
echo "Caught SIGTERM. Deregistering runner"
_TOKEN=$(bash /token.sh)
RUNNER_TOKEN=$(echo "${_TOKEN}" | jq -r .token)
./config.sh remove --token "${RUNNER_TOKEN}"
exit
}
_DISABLE_AUTOMATIC_DEREGISTRATION=${DISABLE_AUTOMATIC_DEREGISTRATION:-false}
_RUNNER_NAME=${RUNNER_NAME:-${RUNNER_NAME_PREFIX:-github-runner}-$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo '')}
_RUNNER_WORKDIR=${RUNNER_WORKDIR:-/_work}
_ORG_RUNNER=${ORG_RUNNER:-false}
_LABELS=${LABELS:-default}
_SHORT_URL=${REPO_URL}
_RUNNER_GROUP=${RUNNER_GROUP:-Default}
_GITHUB_HOST=${GITHUB_HOST:="github.com"}
if [[ -n "${ACCESS_TOKEN}" ]]; then
URI=https://api.github.com
API_VERSION=v3
API_HEADER="Accept: application/vnd.github.${API_VERSION}+json"
AUTH_HEADER="Authorization: token ${ACCESS_TOKEN}"
_PROTO="$(echo "${REPO_URL}" | grep :// | sed -e's,^\(.*://\).*,\1,g')"
# shellcheck disable=SC2116
_URL="$(echo "${REPO_URL/${_PROTO}/}")"
_PATH="$(echo "${_URL}" | grep / | cut -d/ -f2-)"
_ACCOUNT="$(echo "${_PATH}" | cut -d/ -f1)"
_REPO="$(echo "${_PATH}" | cut -d/ -f2)"
_FULL_URI="${URI}/repos/${_ACCOUNT}/${_REPO}/actions/runners/registration-token"
if [[ ${_ORG_RUNNER} == "true" ]]; then
[[ -z ${ORG_NAME} ]] && ( echo "ORG_NAME required for org runners"; exit 1 )
_FULL_URI="${URI}/orgs/${ORG_NAME}/actions/runners/registration-token"
_SHORT_URL="${_PROTO}github.com/${ORG_NAME}"
fi
RUNNER_TOKEN="$(curl -XPOST -fsSL \
-H "${AUTH_HEADER}" \
-H "${API_HEADER}" \
"${_FULL_URI}" \
| jq -r '.token')"
# ensure backwards compatibility
if [[ -z $RUNNER_SCOPE ]]; then
if [[ ${ORG_RUNNER} == "true" ]]; then
echo 'ORG_RUNNER is now deprecated. Please use RUNNER_SCOPE="org" instead.'
export RUNNER_SCOPE="org"
else
export RUNNER_SCOPE="repo"
fi
fi
echo "Configuring"
RUNNER_SCOPE="${RUNNER_SCOPE,,}" # to lowercase
./config.sh \
--url "${_SHORT_URL}" \
--token "${RUNNER_TOKEN}" \
--name "${_RUNNER_NAME}" \
--work "${_RUNNER_WORKDIR}" \
--labels "${_LABELS}" \
--unattended \
--replace
case ${RUNNER_SCOPE} in
org*)
[[ -z ${ORG_NAME} ]] && ( echo "ORG_NAME required for org runners"; exit 1 )
_SHORT_URL="https://${_GITHUB_HOST}/${ORG_NAME}"
RUNNER_SCOPE="org"
;;
./bin/runsvc.sh
ent*)
[[ -z ${ENTERPRISE_NAME} ]] && ( echo "ENTERPRISE_NAME required for enterprise runners"; exit 1 )
_SHORT_URL="https://${_GITHUB_HOST}/enterprises/${ENTERPRISE_NAME}"
RUNNER_SCOPE="enterprise"
;;
*)
[[ -z ${REPO_URL} ]] && ( echo "REPO_URL required for repo runners"; exit 1 )
_SHORT_URL=${REPO_URL}
RUNNER_SCOPE="repo"
;;
esac
configure_runner() {
if [[ -n "${ACCESS_TOKEN}" ]]; then
echo "Obtaining the token of the runnet"
_TOKEN=$(bash /token.sh)
RUNNER_TOKEN=$(echo "${_TOKEN}" | jq -r .token)
fi
echo "Configuring"
./config.sh \
--url "${_SHORT_URL}" \
--token "${RUNNER_TOKEN}" \
--name "${_RUNNER_NAME}" \
--work "${_RUNNER_WORKDIR}" \
--labels "${_LABELS}" \
--runnergroup "${_RUNNER_GROUP}" \
--unattended \
--replace
}
# Opt into runner reusage because a value was given
if [[ -n "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}" ]]; then
echo "Runner reusage is enabled"
# directory exists, copy the data
if [[ -d "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}" ]]; then
echo "Copying previous data"
cp -p -r "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}/." "/actions-runner"
fi
if [ -f "/actions-runner/.runner" ]; then
echo "The runner has already been configured"
else
configure_runner
fi
else
echo "Runner reusage is disabled"
configure_runner
fi
if [[ -n "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}" ]]; then
echo "Reusage is enabled. Storing data to ${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}"
# Quoting (even with double-quotes) the regexp brokes the copying
cp -p -r "/actions-runner/_diag" "/actions-runner/svc.sh" /actions-runner/.[^.]* "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}"
fi
if [[ ${_DISABLE_AUTOMATIC_DEREGISTRATION} == "false" ]]; then
trap deregister_runner SIGINT SIGQUIT SIGTERM
fi
unset ACCESS_TOKEN
unset RUNNER_TOKEN
# Container's command (CMD) execution
"$@"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash -x
#!/bin/bash -ex
GH_RUNNER_VERSION=$1
TARGETPLATFORM=$2
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
_GITHUB_HOST=${GITHUB_HOST:="github.com"}
# If URL is not github.com then use the enterprise api endpoint
if [[ ${GITHUB_HOST} = "github.com" ]]; then
URI="https://api.${_GITHUB_HOST}"
else
URI="https://${_GITHUB_HOST}/api/v3"
fi
API_VERSION=v3
API_HEADER="Accept: application/vnd.github.${API_VERSION}+json"
AUTH_HEADER="Authorization: token ${ACCESS_TOKEN}"
case ${RUNNER_SCOPE} in
org*)
_FULL_URL="${URI}/orgs/${ORG_NAME}/actions/runners/registration-token"
;;
ent*)
_FULL_URL="${URI}/enterprises/${ENTERPRISE_NAME}/actions/runners/registration-token"
;;
*)
_PROTO="https://"
# shellcheck disable=SC2116
_URL="$(echo "${REPO_URL/${_PROTO}/}")"
_PATH="$(echo "${_URL}" | grep / | cut -d/ -f2-)"
_ACCOUNT="$(echo "${_PATH}" | cut -d/ -f1)"
_REPO="$(echo "${_PATH}" | cut -d/ -f2)"
_FULL_URL="${URI}/repos/${_ACCOUNT}/${_REPO}/actions/runners/registration-token"
;;
esac
RUNNER_TOKEN="$(curl -XPOST -fsSL \
-H "${AUTH_HEADER}" \
-H "${API_HEADER}" \
"${_FULL_URL}" \
| jq -r '.token')"
echo "{\"token\": \"${RUNNER_TOKEN}\", \"full_url\": \"${_FULL_URL}\"}"