diff --git a/.github/workflows/build-push-notify.yml b/.github/workflows/build-push-notify.yml index 324ca67..cad3baa 100644 --- a/.github/workflows/build-push-notify.yml +++ b/.github/workflows/build-push-notify.yml @@ -10,6 +10,22 @@ env: IMAGE_NAME: common/base jobs: + actions-runner-base: + runs-on: + group: self-hosted + steps: + - name: Build push actions-runner-base and notify + uses: IMIO/gha/build-push-notify@v3.6.1 + with: + IMAGE_NAME: common/actions-runner-base + IMAGE_TAGS: | + ${{ secrets.HARBOR_URL }}/common/actions-runner-base:latest + REGISTRY_URL: ${{ secrets.HARBOR_URL }} + REGISTRY_USERNAME: ${{ secrets.COMMON_HARBOR_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.COMMON_HARBOR_PASSWORD }} + MATTERMOST_WEBHOOK_URL: ${{ secrets.COMMON_MATTERMOST_WEBHOOK_URL }} + CONTEXT: actions-runner/base + DOCKERFILE: actions-runner/base/Dockerfile py2-ubuntu-20_04: runs-on: group: self-hosted diff --git a/actions-runner/base/Dockerfile b/actions-runner/base/Dockerfile new file mode 100644 index 0000000..ed652be --- /dev/null +++ b/actions-runner/base/Dockerfile @@ -0,0 +1,24 @@ +FROM ghcr.io/actions/actions-runner:latest AS base +ENV DEBIAN_FRONTEND=noninteractive + +USER root + +RUN apt-get update -qqy \ + && apt-get full-upgrade -qqy \ + && apt-get install --no-install-recommends -qqy \ + curl \ + git \ + jq \ + python3-pip \ + tzdata \ + && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ + && apt-get install -qqy nodejs \ + && npm install -g pnpm@latest-8 \ + && pip3 install requests && pip3 install bs4 \ + && rm -rf /var/lib/apt/lists/* \ + && ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime \ + && echo "Europe/Brussels" > /etc/timezone \ + && dpkg-reconfigure tzdata \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +USER runner \ No newline at end of file diff --git a/actions-runner/base/docker-compose.test.yml b/actions-runner/base/docker-compose.test.yml new file mode 100644 index 0000000..bf740d2 --- /dev/null +++ b/actions-runner/base/docker-compose.test.yml @@ -0,0 +1,13 @@ +services: + sut: + build: . + command: > + sh -c " + if which curl git jq && date +%Z | grep -q 'CE'; then + echo \"Tests passed!\" + exit 0 + else + echo \"Tests failed!\" + exit 1 + fi + "