From 500d5eb5a0d8d8a1043ad3841ce4155dfd016f8e Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sun, 15 Sep 2024 23:23:05 +0200 Subject: [PATCH] Initial image --- .github/FUNDING.yml | 1 + .github/renovate.json | 7 +++++++ .github/workflows/main.yml | 23 +++++++++++++++++++++++ Dockerfile | 28 ++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ 5 files changed, 80 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/renovate.json create mode 100644 .github/workflows/main.yml create mode 100644 Dockerfile create mode 100644 LICENSE diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9c4f1ea --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: WyriHaximus \ No newline at end of file diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..ab543ff --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>WyriHaximus/renovate-config:docker-image", + "github>WyriHaximus/renovate-config:php-project" + ] +} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..354dc8e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,23 @@ +name: Continuous Integration +on: + push: + branches: + - main + pull_request: + schedule: + - cron: '0 0 * * 0' +jobs: + build: + name: Build Image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: ${{ github.event_name != 'pull_request' }} + tags: ghcr.io/wyhrihaximusnet/docker-github-action-runner:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4ca2120 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +# syntax=docker/dockerfile:1 +FROM ghcr.io/actions/actions-runner:latest + +USER root + +RUN (echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true";};' | tee /etc/apt/apt.conf.d/clean) &&\ + apt-get update &&\ + apt-get upgrade -y &&\ + apt-get install -y curl wget make git unzip gnupg software-properties-common &&\ + ## terraform + (wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null) &&\ + gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint &&\ + (echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list) &&\ + apt-get update &&\ + apt-get install -y terraform &&\ + ## AWS CLI + curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "/tmp/awscliv2.zip" &&\ + unzip /tmp/awscliv2.zip &&\ + ./aws/install &&\ + rm /tmp/* -Rf \ + +## See https://github.com/actions/checkout/issues/956 +RUN groupmod -g 1000 runner && usermod -u 1000 runner + +USER runner + +# Make sure default installed node and such are available for use +ENV PATH="/home/runner/.local/bin:$PATH" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fa3dd6b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Cees-Jan Kiewiet + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.