Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit a4f0b4c

Browse files
authored
Merge pull request #35 from fullstack-devops/bugfix/add-temurin-17
add temurin 17
2 parents fd487c1 + a28cc4b commit a4f0b4c

File tree

10 files changed

+82
-167
lines changed

10 files changed

+82
-167
lines changed

.github/workflows/build-pr.yml

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,22 @@ jobs:
1212
secrets:
1313
token: ${{ secrets.GITHUB_TOKEN }}
1414

15-
build_base:
15+
load_matrix:
1616
runs-on: ubuntu-latest
17-
needs: generate_infos
17+
outputs:
18+
matrix: ${{ steps.set-matrix.outputs.matrix }}
1819
steps:
1920
- name: Check out the repo
2021
uses: actions/checkout@v2
22+
- id: set-matrix
23+
working-directory: images
24+
run: |
25+
flavours=$(ls -I "base"| xargs echo | sed 's/ /,/g')
26+
echo "Building flavours: $flavours"
27+
flavours="{\"flavour\":[\"`echo "$flavours" | sed 's/,/","/g'`\"]}"
28+
echo "::set-output name=matrix::$flavours"
2129
22-
- name: Login to GitHub Container Registry
23-
uses: docker/login-action@v1
24-
with:
25-
registry: ghcr.io
26-
username: ${{ github.repository_owner }}
27-
password: ${{ secrets.GITHUB_TOKEN }}
28-
29-
- name: Set up QEMU
30-
uses: docker/setup-qemu-action@v1
31-
- name: Set up Docker Buildx
32-
id: buildx
33-
uses: docker/setup-buildx-action@v1
34-
35-
- name: Build github-actions-runner:base
36-
uses: docker/build-push-action@v2
37-
with:
38-
context: ./images/base
39-
push: true
40-
tags: |
41-
${{ env.IMAGE_BASE }}:base-pr-${{ github.event.pull_request.number }}
42-
43-
build_kaniko-sidecar:
30+
build_base:
4431
runs-on: ubuntu-latest
4532
needs: generate_infos
4633
steps:
@@ -60,20 +47,19 @@ jobs:
6047
id: buildx
6148
uses: docker/setup-buildx-action@v1
6249

63-
- name: Build github-actions-runner:kaniko-sidecar
50+
- name: Build github-actions-runner:base
6451
uses: docker/build-push-action@v2
6552
with:
66-
context: ./images/kaniko-sidecar
53+
context: ./images/base
6754
push: true
6855
tags: |
69-
${{ env.IMAGE_BASE }}:kaniko-sidecar-pr-${{ github.event.pull_request.number }}
56+
${{ env.IMAGE_BASE }}:base-pr-${{ github.event.pull_request.number }}
7057
71-
build_flavors:
58+
build_flavours:
7259
runs-on: ubuntu-latest
73-
needs: [generate_infos, build_base]
60+
needs: [generate_infos, load_matrix, build_base]
7461
strategy:
75-
matrix:
76-
flavor: [ansible-k8s, maven-adopt-8-ng, maven-temurin-11, golang, ng-cli-karma, fullstacked]
62+
matrix: ${{ fromJson(needs.load_matrix.outputs.matrix) }}
7763
steps:
7864
- name: Check out the repo
7965
uses: actions/checkout@v2
@@ -94,12 +80,12 @@ jobs:
9480
- name: link child image to current pr
9581
run: |
9682
sed -i --expression "s@FROM ${{ env.IMAGE_BASE }}.*@FROM ${{ env.IMAGE_BASE }}:base-pr-${{ github.event.pull_request.number }}@g" \
97-
images/${{ matrix.flavor }}/Dockerfile
83+
images/${{ matrix.flavour }}/Dockerfile
9884
99-
- name: Build github-actions-runner:${{ matrix.flavor }}
85+
- name: Build github-actions-runner:${{ matrix.flavour }}
10086
uses: docker/build-push-action@v2
10187
with:
102-
context: ./images/${{ matrix.flavor }}
88+
context: ./images/${{ matrix.flavour }}
10389
push: true
10490
tags: |
105-
${{ env.IMAGE_BASE }}:${{ matrix.flavor }}-pr-${{ github.event.pull_request.number }}
91+
${{ env.IMAGE_BASE }}:${{ matrix.flavour }}-pr-${{ github.event.pull_request.number }}

.github/workflows/cleanup-pr.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,31 @@ on:
55
types: [closed]
66

77
jobs:
8-
purge_base_images:
9-
name: Delete image from ghcr.io
8+
load_matrix:
109
runs-on: ubuntu-latest
10+
outputs:
11+
matrix: ${{ steps.set-matrix.outputs.matrix }}
1112
steps:
12-
- name: Delete github-actions-runner:base
13-
uses: bots-house/ghcr-delete-image-action@v1.0.0
14-
with:
15-
owner: ${{ github.repository_owner }}
16-
name: github-actions-runner
17-
token: ${{ secrets.GH_DEL_IMAGE_PAT }}
18-
tag: base-pr-${{ github.event.pull_request.number }}
19-
20-
- name: Delete github-actions-runner:kaniko-sidecar
21-
uses: bots-house/ghcr-delete-image-action@v1.0.0
22-
with:
23-
owner: ${{ github.repository_owner }}
24-
name: github-actions-runner
25-
token: ${{ secrets.GH_DEL_IMAGE_PAT }}
26-
tag: kaniko-sidecar-pr-${{ github.event.pull_request.number }}
13+
- name: Check out the repo
14+
uses: actions/checkout@v2
15+
- id: set-matrix
16+
working-directory: images
17+
run: |
18+
flavours=$(ls -I "base"| xargs echo | sed 's/ /,/g')
19+
echo "Building flavours: $flavours"
20+
flavours="{\"flavour\":[\"`echo "$flavours" | sed 's/,/","/g'`\"]}"
21+
echo "::set-output name=matrix::$flavours"
2722
28-
purge_flavor_images:
29-
name: Delete image from ghcr.io
23+
purge_images:
3024
runs-on: ubuntu-latest
25+
needs: load_matrix
3126
strategy:
32-
matrix:
33-
flavor: [ansible-k8s, maven-adopt-8-ng, maven-temurin-11, golang, ng-cli-karma, fullstacked]
27+
matrix: ${{ fromJson(needs.load_matrix.outputs.matrix) }}
3428
steps:
35-
- name: Delete github-actions-runner:${{ matrix.flavor }}
29+
- name: Delete github-actions-runner:${{ matrix.flavour }}
3630
uses: bots-house/ghcr-delete-image-action@v1.0.0
3731
with:
3832
owner: ${{ github.repository_owner }}
3933
name: github-actions-runner
4034
token: ${{ secrets.GH_DEL_IMAGE_PAT }}
41-
tag: ${{ matrix.flavor }}-pr-${{ github.event.pull_request.number }}
35+
tag: ${{ matrix.flavour }}-pr-${{ github.event.pull_request.number }}

.github/workflows/create-release.yml

Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ jobs:
1818
secrets:
1919
token: ${{ secrets.GITHUB_TOKEN }}
2020

21+
load_matrix:
22+
runs-on: ubuntu-latest
23+
outputs:
24+
matrix: ${{ steps.set-matrix.outputs.matrix }}
25+
steps:
26+
- name: Check out the repo
27+
uses: actions/checkout@v2
28+
- id: set-matrix
29+
working-directory: images
30+
run: |
31+
flavours=$(ls -I "base"| xargs echo | sed 's/ /,/g')
32+
echo "Building flavours: $flavours"
33+
flavours="{\"flavour\":[\"`echo "$flavours" | sed 's/,/","/g'`\"]}"
34+
echo "::set-output name=matrix::$flavours"
35+
2136
build_base:
2237
runs-on: ubuntu-latest
2338
needs: create_release
@@ -56,48 +71,11 @@ jobs:
5671
quay.io/${{ env.IMAGE_NAME }}:latest-base
5772
quay.io/${{ env.IMAGE_NAME }}:${{needs.create_release.outputs.version}}-base
5873
59-
build_kaniko-sidecar:
60-
runs-on: ubuntu-latest
61-
needs: create_release
62-
steps:
63-
- name: Check out the repo
64-
uses: actions/checkout@v2
65-
66-
- name: Login to GitHub Container Registry
67-
uses: docker/login-action@v1
68-
with:
69-
registry: ghcr.io
70-
username: ${{ github.repository_owner }}
71-
password: ${{ secrets.GITHUB_TOKEN }}
72-
- name: Login to Red Hat Quay
73-
uses: docker/login-action@v1
74-
with:
75-
registry: quay.io
76-
username: ${{ secrets.RH_QUAY_USERNAME }}
77-
password: ${{ secrets.RH_QUAY_PASSWORD }}
78-
79-
- name: Set up QEMU
80-
uses: docker/setup-qemu-action@v1
81-
- name: Set up Docker Buildx
82-
uses: docker/setup-buildx-action@v1
83-
84-
- name: Build github-actions-runner:kaniko-sidecar
85-
uses: docker/build-push-action@v2
86-
with:
87-
context: ./images/kaniko-sidecar
88-
push: true
89-
tags: |
90-
ghcr.io/${{ env.IMAGE_NAME }}:latest-kaniko-sidecar
91-
ghcr.io/${{ env.IMAGE_NAME }}:${{needs.create_release.outputs.version}}-kaniko-sidecar
92-
quay.io/${{ env.IMAGE_NAME }}:latest-kaniko-sidecar
93-
quay.io/${{ env.IMAGE_NAME }}:${{needs.create_release.outputs.version}}-kaniko-sidecar
94-
95-
build_flavors:
74+
build_flavours:
9675
runs-on: ubuntu-latest
97-
needs: [create_release, build_base]
76+
needs: [create_release, load_matrix, build_base]
9877
strategy:
99-
matrix:
100-
flavor: [ansible-k8s, maven-adopt-8-ng, maven-temurin-11, golang, ng-cli-karma, fullstacked]
78+
matrix: ${{ fromJson(needs.load_matrix.outputs.matrix) }}
10179
steps:
10280
- name: Check out the repo
10381
uses: actions/checkout@v2
@@ -123,22 +101,22 @@ jobs:
123101
- name: link child image to current version
124102
run: |
125103
sed -i --expression "s@FROM ghcr.io/${{ env.IMAGE_NAME }}.*@FROM ghcr.io/${{ env.IMAGE_NAME }}:${{needs.create_release.outputs.version}}-base@g" \
126-
images/${{ matrix.flavor }}/Dockerfile
104+
images/${{ matrix.flavour }}/Dockerfile
127105
128-
- name: Build github-actions-runner:${{ matrix.flavor }}
106+
- name: Build github-actions-runner:${{ matrix.flavour }}
129107
uses: docker/build-push-action@v2
130108
with:
131-
context: ./images/${{ matrix.flavor }}
109+
context: ./images/${{ matrix.flavour }}
132110
push: true
133111
tags: |
134-
ghcr.io/${{ env.IMAGE_NAME }}:latest-${{ matrix.flavor }}
135-
ghcr.io/${{ env.IMAGE_NAME }}:${{needs.create_release.outputs.version}}-${{ matrix.flavor }}
136-
quay.io/${{ env.IMAGE_NAME }}:latest-${{ matrix.flavor }}
137-
quay.io/${{ env.IMAGE_NAME }}:${{needs.create_release.outputs.version}}-${{ matrix.flavor }}
112+
ghcr.io/${{ env.IMAGE_NAME }}:latest-${{ matrix.flavour }}
113+
ghcr.io/${{ env.IMAGE_NAME }}:${{needs.create_release.outputs.version}}-${{ matrix.flavour }}
114+
quay.io/${{ env.IMAGE_NAME }}:latest-${{ matrix.flavour }}
115+
quay.io/${{ env.IMAGE_NAME }}:${{needs.create_release.outputs.version}}-${{ matrix.flavour }}
138116
139117
publish_release:
140118
runs-on: ubuntu-latest
141-
needs: [create_release, build_base, build_flavors]
119+
needs: [create_release, build_base, build_flavours]
142120
steps:
143121
- name: Checkout code
144122
uses: actions/checkout@v2

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Anchore Container Scan](https://github.com/fullstack-devops/github-actions-runner/actions/workflows/anchore.yml/badge.svg)](https://github.com/fullstack-devops/github-actions-runner/actions/workflows/anchore.yml)
33

44
# GitHub Actions Custom Runner
5-
Container images with Github Actions Runner. Different flavored images with preinstalled tools and software for builds with limited internet access and non root privileges (exception for kaniko).
5+
Container images with Github Actions Runner. Different flavoured images with preinstalled tools and software for builds with limited internet access and non root privileges (exception for kaniko).
66
With a focus on already installed software to avoid a subsequent installation by a `setup-action`.
77

88
Ideal for building software in corporate environments of large and small organizations that often restrict Internet access.
@@ -13,12 +13,16 @@ Support: If you need help or a feature just open an issue!
1313
Package / Images: `ghcr.io/fullstack-devops/github-actions-runner`
1414

1515
Available Tags:
16-
| Name (tag) | Installed Tools/ Software | Description |
17-
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
18-
| `latest-base` | libffi-dev, libicu-dev, build-essential, libssl-dev, ca-certificates, jq, sed, grep, git, curl, wget, zip, [awesome-ci](https://github.com/fullstack-devops/awesome-ci), [alpaca](https://github.com/samuong/alpaca) | Base runner with nothing fancy installed <br> [Dockerfile](images/base/Dockerfile) |
19-
| `latest-kaniko-sidecar` | kaniko | Sidecar used by other runner images to build containers without root privileges |
20-
| `latest-ansible-k8s` | base-image + ansible, helm, kubectl, skopeo | Runner specialized for automated k8s deployments via ansible <br> For more Details see [Dockerfile](images/ansible-k8s/Dockerfile) |
21-
| `latest-fullstacked` | base-image + ansible, helm, maven, temurin-11, nodejs, go, yarn, angular/cli, chromium | Runner with a bunch of tools to build your hole application<br> For more Details see [Dockerfile](images/fullstacked/Dockerfile) |
16+
| Name (tag) | Installed Tools/ Software | Dockerfile | Description |
17+
|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|----------------------------------------------------------------------------------------------------|
18+
| `latest-base` | libffi-dev, libicu-dev, build-essential, libssl-dev, ca-certificates, jq, sed, grep, git, curl, wget, zip, [awesome-ci](https://github.com/fullstack-devops/awesome-ci), [alpaca](https://github.com/samuong/alpaca) | [Dockerfile](images/base/Dockerfile) | Base runner with nothing fancy installed, but with internet connection more tools can be installed |
19+
| `latest-kaniko-sidecar` | kaniko | [Dockerfile](images/kaniko-sidecar/Dockerfile) | Sidecar used by other runner images to build containers |
20+
| `latest-ansible-k8s` | base-image + ansible, helm, kubectl, skopeo | [Dockerfile](images/ansible-k8s/Dockerfile) | Runner specializing in automated k8s deployments via Ansible in your cluster |
21+
| `latest-maven-adopt-8-ng` | base-image + ansible, helm, maven, adoptopenjdk-8-hotspot, xmlstarlet, nodejs | [Dockerfile](images/maven-adopt-8-ng/Dockerfile) | Runner specialized in building Java applications that requires an older Java 8 version |
22+
| `latest-maven-temurin-11` | base-image + ansible, helm, maven, temurin-11, xmlstarlet, nodejs | [Dockerfile](images/maven-temurin-11/Dockerfile) | Runner specialized in building Java applications that requires Java temurin-11 |
23+
| `latest-maven-temurin-17` | base-image + ansible, helm, maven, temurin-17, xmlstarlet, nodejs | [Dockerfile](images/maven-temurin-17/Dockerfile) | Runner specialized in building Java applications that requires Java temurin-17 |
24+
| `latest-ng-cli-karma` | base-image + ansible, helm, nodejs, npm, yarn, angular/cli, chromium | [Dockerfile](images/ng-cli-karma/Dockerfile) | Runner specialized in building Angular application and capable for testing with chromium and karma |
25+
| `latest-golang` | base-image + ansible, helm, go, nodejs | [Dockerfile](images/golang/Dockerfile) | Runner specialized in building go applications |
2226

2327
> Hint: `latest` can be replaced with an specific release version for more stability in your environment.
2428
@@ -29,7 +33,7 @@ Available Tags:
2933
### Required environmental variables
3034

3135
| Variable | Type | Description |
32-
| ----------------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
36+
|-------------------|--------|-------------------------------------------------------------------------------------------------------------------|
3337
| `GH_ORG` | string | Points to the GitHub Organisation where the runner should be installed |
3438
| `GH_ACCESS_TOKEN` | string | Developer Token vor the GitHub Organisation<br> This Token can be personal and is onlv needed during installation |
3539

@@ -38,7 +42,7 @@ Available Tags:
3842
For the helm values see the [values.yaml](https://github.com/fullstack-devops/helm-charts/blob/main/charts/github-actions-runner/values.yaml), section `envValues`
3943

4044
| Variable | Type | Default | Description |
41-
| ----------------- | ------ | ------------------------ | -------------------------------------------------------------------- |
45+
|-------------------|--------|--------------------------|----------------------------------------------------------------------|
4246
| `GH_URL` | string | `https://github.com` | For GitHub Enterprise support |
4347
| `GH_API_ENDPOINT` | string | `https://api.github.com` | For GitHub Enterprise support eg.: `https://git.example.com/api/v3/` |
4448
| `GH_REPO` | string | | installing a runner to a spezific repository |

images/fullstacked/display-chromium

Lines changed: 0 additions & 3 deletions
This file was deleted.

images/fullstacked/xvfb-chromium

Lines changed: 0 additions & 23 deletions
This file was deleted.

images/fullstacked/xvfb-chromium-webgl

Lines changed: 0 additions & 21 deletions
This file was deleted.

images/maven-temurin-11/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ghcr.io/fullstack-devops/github-actions-runner:latest-base
33
USER root
44
# install packages along with jq so we can parse JSON
55
# add additional packages as necessary
6-
ARG PACKAGES="temurin-11-jdk maven nodejs ansible"
6+
ARG PACKAGES="temurin-11-jdk xmlstarlet maven nodejs ansible"
77
ARG PACKAGES_PYTHON="kubernetes"
88

99
## ansible keys

0 commit comments

Comments
 (0)