Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9344afdc50 | ||
|
|
52d87d6727 | ||
|
|
b309ff2df9 | ||
|
|
b5f81fb112 | ||
|
|
19940c2f55 | ||
|
|
f1cd067454 | ||
|
|
07278d23d5 | ||
|
|
cb6af2d89e | ||
|
|
c35d11b3e0 | ||
|
|
6ceb1d22be | ||
|
|
8434e76f7a | ||
|
|
96599f2388 | ||
|
|
18d9460fdb | ||
|
|
5cf71789a5 | ||
|
|
bcabaf3047 | ||
|
|
a822249136 | ||
|
|
16bf61e038 | ||
|
|
3d633a3532 | ||
|
|
53fcddcca7 | ||
|
|
af64b04ec6 | ||
|
|
0e877f4aef | ||
|
|
33822a9108 | ||
|
|
7e82d769c6 | ||
|
|
c3ed823392 | ||
|
|
359b93cb8b | ||
|
|
fa3beacfc7 | ||
|
|
b0620cddd3 | ||
|
|
69c6706a93 | ||
|
|
19e72e593a | ||
|
|
a32f033a3a | ||
|
|
d8f341cb13 | ||
|
|
691f0a2d0a | ||
|
|
2f5a5357f2 | ||
|
|
e4c1b47fb1 | ||
|
|
816ea853f8 | ||
|
|
f5245230fa | ||
|
|
003622052f | ||
|
|
28036a223a | ||
|
|
3849a3bb3a | ||
|
|
19fbe505ed | ||
|
|
c31412d677 | ||
|
|
ca0201ca61 | ||
|
|
8a60195729 | ||
|
|
ec6a3c2b02 | ||
|
|
869eed00ad | ||
|
|
02345f60eb | ||
|
|
ce3fa67d01 | ||
|
|
0defbf05c9 | ||
|
|
25ced0a285 | ||
|
|
6f041688da | ||
|
|
9cb13e5d9d | ||
|
|
bede34073e | ||
|
|
aff2a788bf | ||
|
|
a911c0ae52 | ||
|
|
558d9c966b | ||
|
|
e929641491 | ||
|
|
4d04be45b3 | ||
|
|
c6c8324c99 | ||
|
|
9a1f879815 | ||
|
|
182f60392a | ||
|
|
bdeda7540b | ||
|
|
37c5c6cedf | ||
|
|
ca56e475d5 | ||
|
|
123abdad71 | ||
|
|
bc28f6b970 | ||
|
|
d6f3aa6c8e | ||
|
|
a4cb10ea80 | ||
|
|
03a6e8470a | ||
|
|
a125d7e21e | ||
|
|
3f79a3e7e5 | ||
|
|
855113b437 | ||
|
|
90bea89598 | ||
|
|
fb6fdfa1c5 |
+12
-12
@@ -19,16 +19,16 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.base
|
||||
@@ -51,18 +51,18 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Copy Dockerfile
|
||||
run: cp Dockerfile.base Dockerfile.base.ubuntu-${{ matrix.release }}; sed -i.bak 's/FROM.*/FROM ubuntu:${{ matrix.release }}/' Dockerfile.base.ubuntu-${{ matrix.release }}
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.base.ubuntu-${{ matrix.release }}
|
||||
@@ -85,18 +85,18 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Copy Dockerfile
|
||||
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 to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.base.debian-${{ matrix.release }}
|
||||
|
||||
@@ -23,24 +23,24 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Update Dockerfile FROM org
|
||||
run: sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:latest/" Dockerfile
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
@@ -63,24 +63,24 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Copy Dockerfile
|
||||
run: cp Dockerfile Dockerfile.ubuntu-${{ matrix.release }}; sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:ubuntu-${{ matrix.release }}/" Dockerfile.ubuntu-${{ matrix.release }}
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.ubuntu-${{ matrix.release }}
|
||||
@@ -103,24 +103,24 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Copy Dockerfile
|
||||
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 to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.debian-${{ matrix.release }}
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
@@ -37,24 +37,24 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Update Dockerfile FROM org
|
||||
run: sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:latest/" Dockerfile
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
@@ -80,24 +80,24 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Copy Dockerfile
|
||||
run: cp Dockerfile Dockerfile.ubuntu-${{ matrix.release }}; sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:ubuntu-${{ matrix.release }}/" Dockerfile.ubuntu-${{ matrix.release }}
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.ubuntu-${{ matrix.release }}
|
||||
@@ -123,24 +123,24 @@ jobs:
|
||||
- name: Get GitHub organization or user
|
||||
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}') >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Copy Dockerfile
|
||||
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 to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.debian-${{ matrix.release }}
|
||||
|
||||
@@ -8,8 +8,8 @@ jobs:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v3
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
shellcheck 0.7.0
|
||||
shellcheck 0.9.0
|
||||
|
||||
+20
-9
@@ -1,17 +1,28 @@
|
||||
# Welcome to docker-github-actions-runner contributing guide <!-- omit in toc -->
|
||||
# Contributing to docker-github-actions-runner
|
||||
|
||||
Welcome!
|
||||
Thank you for your interest in contributing to `docker-github-actions-runner`! This guide is designed to make your contribution experience smooth and effective. Let's work together to make this project even better!
|
||||
|
||||
## Code of conduct
|
||||
## Table of Contents
|
||||
- [Code of Conduct](#code-of-conduct)
|
||||
- [Issues](#issues)
|
||||
- [Before Creating an Issue](#before-creating-an-issue)
|
||||
- [Contribute to the Wiki](#contribute-to-the-wiki)
|
||||
|
||||
Be kind, research before asking/contributing.
|
||||
## Code of Conduct
|
||||
|
||||
Please remember that my time is limited and my resources are as well. Solving "nuances" will likely require external contributions but I'm happy to help and guide.
|
||||
We aim to foster a welcoming and inclusive environment for all contributors. Here are some guidelines to keep in mind:
|
||||
|
||||
### Issues
|
||||
- **Be Respectful**: Treat everyone with kindness and respect. Avoid making assumptions or passing judgments.
|
||||
- **Do Your Research**: Before asking or contributing, take a moment to research. It's possible that your question or issue has already been addressed.
|
||||
- **Value Everyone's Time**: Please understand that the maintainers and contributors have other commitments. While we're always eager to help, addressing certain nuances might require external contributions. However, we're here to guide and assist you.
|
||||
|
||||
#### Create a new issue
|
||||
## Issues
|
||||
|
||||
If you spot an issue, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If a related issue doesn't exist, you can open a new issue using a relevant issue.
|
||||
### Before Creating an Issue
|
||||
|
||||
Also use [the wiki](https://github.com/myoung34/docker-github-actions-runner/wiki) and contribute to it
|
||||
1. **Search Existing Issues**: Before creating a new issue, please [check if a similar issue already exists](https://github.com/myoung34/docker-github-actions-runner/issues). This helps in reducing duplicates and streamlining discussions.
|
||||
2. **Refer to the Wiki**: The [project's wiki](https://github.com/myoung34/docker-github-actions-runner/wiki) is a valuable resource. It might have the information or solution you're seeking.
|
||||
|
||||
## Contribute to the Wiki
|
||||
|
||||
The [wiki](https://github.com/myoung34/docker-github-actions-runner/wiki) is a collaborative space for the community. You're encouraged to share knowledge, tips, and best practices related to `docker-github-actions-runner`. Your contributions can help others and enhance the overall quality of the wiki.
|
||||
|
||||
+2
-1
@@ -5,7 +5,8 @@ LABEL maintainer="myoung34@my.apsu.edu"
|
||||
ENV AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
|
||||
RUN mkdir -p /opt/hostedtoolcache
|
||||
|
||||
ARG GH_RUNNER_VERSION="2.301.1"
|
||||
ARG GH_RUNNER_VERSION="2.311.0"
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
+7
-6
@@ -4,14 +4,13 @@ LABEL maintainer="myoung34@my.apsu.edu"
|
||||
ARG DUMB_INIT_VERSION="1.2.2"
|
||||
ARG GIT_CORE_PPA_KEY="A1715D88E1DF1F24"
|
||||
|
||||
ENV DOCKER_COMPOSE_VERSION="1.27.4"
|
||||
ENV GIT_LFS_VERSION="3.2.0"
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LANGUAGE=en_US.UTF-8
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
# hadolint ignore=SC2086,DL3015,DL3008,DL3013
|
||||
# hadolint ignore=SC2086,DL3015,DL3008,DL3013,SC2015
|
||||
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends gnupg \
|
||||
@@ -46,6 +45,7 @@ RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
|
||||
dumb-init \
|
||||
nodejs \
|
||||
rsync \
|
||||
libpq-dev \
|
||||
gosu \
|
||||
&& DPKG_ARCH="$(dpkg --print-architecture)" \
|
||||
&& LSB_RELEASE_CODENAME="$(lsb_release --codename | cut -f2)" \
|
||||
@@ -60,11 +60,11 @@ RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
|
||||
&& distro=$(lsb_release -is | awk '{print tolower($0)}') \
|
||||
&& mkdir -p /etc/apt/keyrings \
|
||||
&& ( curl -fsSL https://download.docker.com/linux/${distro}/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg ) \
|
||||
&& version=$(lsb_release -cs | sed 's/bookworm\|n\/a/bullseye/g') \
|
||||
&& version=$(lsb_release -cs | sed 's/trixie\|n\/a/bookworm/g') \
|
||||
&& ( echo "deb [arch=${DPKG_ARCH} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/${distro} ${version} stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null ) \
|
||||
&& apt-get update \
|
||||
&& 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 ) ) \
|
||||
&& apt-get install -y docker-ce docker-ce-cli docker-buildx-plugin containerd.io docker-compose-plugin --no-install-recommends --allow-unauthenticated \
|
||||
&& echo -e '#!/bin/sh\ndocker compose --compatibility "$@"' > /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose \
|
||||
&& ( [[ "${LSB_RELEASE_CODENAME}" == "focal" ]] && ( echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list && curl -L "https://build.opensuse.org/projects/devel:kubic/public_key" | apt-key add -; echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list && curl -L "https://build.opensuse.org/projects/devel:kubic/public_key" | apt-key add - && apt-get update) || : ) \
|
||||
&& ( [[ "${LSB_RELEASE_CODENAME}" == "focal" || "${LSB_RELEASE_CODENAME}" == "jammy" || "${LSB_RELEASE_CODENAME}" == "sid" || "${LSB_RELEASE_CODENAME}" == "bullseye" ]] && apt-get install -y --no-install-recommends podman buildah skopeo || : ) \
|
||||
&& ( [[ "${LSB_RELEASE_CODENAME}" == "jammy" ]] && echo "Ubuntu Jammy is marked as beta. Please see https://github.com/actions/virtual-environments/issues/5490" || : ) \
|
||||
@@ -77,4 +77,5 @@ RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
|
||||
&& useradd -mr -d /home/runner -u 1001 -g 121 runner \
|
||||
&& usermod -aG sudo runner \
|
||||
&& usermod -aG docker runner \
|
||||
&& echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
&& echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
|
||||
&& ( [[ -f /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list ]] && rm /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list || : )
|
||||
|
||||
@@ -31,11 +31,6 @@ Also, some GitHub Actions Workflow features, like [Job Services](https://docs.gi
|
||||
|
||||
Currently runners [do not support containerd](https://github.com/actions/runner/issues/1265)
|
||||
|
||||
### 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 |
|
||||
@@ -55,7 +50,8 @@ These containers are built via Github actions that [copy the dockerfile](https:/
|
||||
| --- | --- |
|
||||
| `RUN_AS_ROOT` | Boolean to run as root. If `true`: will run as root. If `True` and the user is overridden it will error. If any other value it will run as the `runner` user and allow an optional override. Default is `true` |
|
||||
| `RUNNER_NAME` | The name of the runner to use. Supercedes (overrides) `RUNNER_NAME_PREFIX` |
|
||||
| `RUNNER_NAME_PREFIX` | A prefix for runner name (followed by docker container id). You must not also provide `RUNNER_NAME`. Defaults to `github-runner` |
|
||||
| `RUNNER_NAME_PREFIX` | A prefix for runner name (See `RANDOM_RUNNER_SUFFIX` for how the full name is generated). Note: will be overridden by `RUNNER_NAME` if provided. Defaults to `github-runner` |
|
||||
| `RANDOM_RUNNER_SUFFIX` | Boolean to use a randomized runner name suffix (preceeded by `RUNNER_NAME_PREFIX`). Will use a 13 character random string by default. If set to a value other than true it will attempt to use the contents of `/etc/hostname` or fall back to a random string if the file does not exist or is empty. Note: will be overridden by `RUNNER_NAME` if provided. Defaults to `true`. |
|
||||
| `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` |
|
||||
| `APP_ID` | The github application ID. Must be paired with `APP_PRIVATE_KEY` and should not be used with `ACCESS_TOKEN` or `RUNNER_TOKEN` |
|
||||
| `APP_PRIVATE_KEY` | The github application private key. Must be paired with `APP_ID` and should not be used with `ACCESS_TOKEN` or `RUNNER_TOKEN` |
|
||||
@@ -73,3 +69,4 @@ These containers are built via Github actions that [copy the dockerfile](https:/
|
||||
| `CONFIGURED_ACTIONS_RUNNER_FILES_DIR` | Path to use for runner data. It allows avoiding reregistration each the start of the runner. No default value. |
|
||||
| `EPHEMERAL` | Optional flag to configure runner with [`--ephemeral` option](https://docs.github.com/en/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners#using-ephemeral-runners-for-autoscaling). Ephemeral runners are suitable for autoscaling. |
|
||||
| `DISABLE_AUTO_UPDATE` | Optional environment variable to [disable auto updates](https://github.blog/changelog/2022-02-01-github-actions-self-hosted-runners-can-now-disable-automatic-updates/). Auto updates are enabled by default to preserve past behavior. Any value is considered truthy and will disable them. |
|
||||
| `START_DOCKER_SERVICE` | Optional flag which automatically starts the docker service if set to `true`. Useful when using [sysbox](https://github.com/nestybox/sysbox). Defaults to `false`.
|
||||
|
||||
+31
-5
@@ -23,12 +23,30 @@ deregister_runner() {
|
||||
|
||||
_DISABLE_AUTOMATIC_DEREGISTRATION=${DISABLE_AUTOMATIC_DEREGISTRATION:-false}
|
||||
|
||||
_RUNNER_NAME=${RUNNER_NAME:-${RUNNER_NAME_PREFIX:-github-runner}-$(cat /etc/hostname)}
|
||||
_RUNNER_WORKDIR=${RUNNER_WORKDIR:-/_work-${_RUNNER_NAME}}
|
||||
_RANDOM_RUNNER_SUFFIX=${RANDOM_RUNNER_SUFFIX:="true"}
|
||||
|
||||
_RUNNER_NAME=${RUNNER_NAME:-${RUNNER_NAME_PREFIX:-github-runner}-$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo '')}
|
||||
if [[ ${RANDOM_RUNNER_SUFFIX} != "true" ]]; then
|
||||
# In some cases this file does not exist
|
||||
if [[ -f "/etc/hostname" ]]; then
|
||||
# in some cases it can also be empty
|
||||
if [[ $(stat --printf="%s" /etc/hostname) -ne 0 ]]; then
|
||||
_RUNNER_NAME=${RUNNER_NAME:-${RUNNER_NAME_PREFIX:-github-runner}-$(cat /etc/hostname)}
|
||||
echo "RANDOM_RUNNER_SUFFIX is ${RANDOM_RUNNER_SUFFIX}. /etc/hostname exists and has content. Setting runner name to ${_RUNNER_NAME}"
|
||||
else
|
||||
echo "RANDOM_RUNNER_SUFFIX is ${RANDOM_RUNNER_SUFFIX} ./etc/hostname exists but is empty. Not using /etc/hostname."
|
||||
fi
|
||||
else
|
||||
echo "RANDOM_RUNNER_SUFFIX is ${RANDOM_RUNNER_SUFFIX} but /etc/hostname does not exist. Not using /etc/hostname."
|
||||
fi
|
||||
fi
|
||||
|
||||
_RUNNER_WORKDIR=${RUNNER_WORKDIR:-/_work/${_RUNNER_NAME}}
|
||||
_LABELS=${LABELS:-default}
|
||||
_RUNNER_GROUP=${RUNNER_GROUP:-Default}
|
||||
_GITHUB_HOST=${GITHUB_HOST:="github.com"}
|
||||
_RUN_AS_ROOT=${RUN_AS_ROOT:="true"}
|
||||
_START_DOCKER_SERVICE=${START_DOCKER_SERVICE:="false"}
|
||||
|
||||
# ensure backwards compatibility
|
||||
if [[ -z ${RUNNER_SCOPE} ]]; then
|
||||
@@ -149,6 +167,14 @@ if [[ ${_DISABLE_AUTOMATIC_DEREGISTRATION} == "false" ]]; then
|
||||
trap deregister_runner SIGINT SIGQUIT SIGTERM INT TERM QUIT
|
||||
fi
|
||||
|
||||
# Start docker service if needed (e.g. for docker-in-docker)
|
||||
if [[ ${_START_DOCKER_SERVICE} == "true" ]]; then
|
||||
echo "Starting docker service"
|
||||
_PREFIX=""
|
||||
[[ ${_RUN_AS_ROOT} != "true" ]] && _PREFIX="sudo"
|
||||
${_PREFIX} service docker start
|
||||
fi
|
||||
|
||||
# Container's command (CMD) execution as runner user
|
||||
|
||||
|
||||
@@ -161,10 +187,10 @@ if [[ ${_RUN_AS_ROOT} == "true" ]]; then
|
||||
fi
|
||||
else
|
||||
if [[ $(id -u) -eq 0 ]]; then
|
||||
[[ -n "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}" ]] && /usr/bin/chown -R runner "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}"
|
||||
/usr/bin/chown -R runner "${_RUNNER_WORKDIR}" /actions-runner
|
||||
[[ -n "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}" ]] && chown -R runner "${CONFIGURED_ACTIONS_RUNNER_FILES_DIR}"
|
||||
chown -R runner "${_RUNNER_WORKDIR}" /actions-runner
|
||||
# The toolcache is not recursively chowned to avoid recursing over prepulated tooling in derived docker images
|
||||
/usr/bin/chown runner /opt/hostedtoolcache/
|
||||
chown runner /opt/hostedtoolcache/
|
||||
/usr/sbin/gosu runner "$@"
|
||||
else
|
||||
"$@"
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"matchDepTypes": ["devDependencies"],
|
||||
"automerge": true
|
||||
}
|
||||
],
|
||||
"platformAutomerge": true
|
||||
}
|
||||
Reference in New Issue
Block a user