Skip to content

Commit

Permalink
feat: action runner base
Browse files Browse the repository at this point in the history
DEVOPS-138
  • Loading branch information
remdub committed Jul 29, 2024
1 parent cbb9b16 commit 45cd8c0
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build-push-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
Expand Down
24 changes: 24 additions & 0 deletions actions-runner/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions actions-runner/base/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -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
"

0 comments on commit 45cd8c0

Please sign in to comment.