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

Commit 9b3a430

Browse files
authored
Merge pull request #16 from fullstack-devops/bugfix/chart-update
Bugfix/chart update
2 parents dc94496 + c38113f commit 9b3a430

File tree

3 files changed

+104
-31
lines changed

3 files changed

+104
-31
lines changed

.github/workflows/build-pr.yml

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,26 @@ jobs:
4040
tags: |
4141
${{ env.IMAGE_BASE }}:base-pr-${{ github.event.pull_request.number }}
4242
43+
build_kaniko-sidecar:
44+
runs-on: ubuntu-latest
45+
needs: generate_infos
46+
steps:
47+
- name: Check out the repo
48+
uses: actions/checkout@v2
49+
50+
- name: Login to GitHub Container Registry
51+
uses: docker/login-action@v1
52+
with:
53+
registry: ghcr.io
54+
username: ${{ github.repository_owner }}
55+
password: ${{ secrets.GITHUB_TOKEN }}
56+
57+
- name: Set up QEMU
58+
uses: docker/setup-qemu-action@v1
59+
- name: Set up Docker Buildx
60+
id: buildx
61+
uses: docker/setup-buildx-action@v1
62+
4363
- name: Build github-actions-runner:kaniko-sidecar
4464
uses: docker/build-push-action@v2
4565
with:
@@ -48,24 +68,38 @@ jobs:
4868
tags: |
4969
${{ env.IMAGE_BASE }}:kaniko-sidecar-pr-${{ github.event.pull_request.number }}
5070
71+
build_flavors:
72+
runs-on: ubuntu-latest
73+
needs: [generate_infos, build_base]
74+
strategy:
75+
matrix:
76+
flavor: [ansible-k8s, fullstacked]
77+
steps:
78+
- name: Check out the repo
79+
uses: actions/checkout@v2
80+
81+
- name: Login to GitHub Container Registry
82+
uses: docker/login-action@v1
83+
with:
84+
registry: ghcr.io
85+
username: ${{ github.repository_owner }}
86+
password: ${{ secrets.GITHUB_TOKEN }}
87+
88+
- name: Set up QEMU
89+
uses: docker/setup-qemu-action@v1
90+
- name: Set up Docker Buildx
91+
id: buildx
92+
uses: docker/setup-buildx-action@v1
93+
5194
- name: link child image to current pr
5295
run: |
5396
sed -i --expression "s@FROM ${{ env.IMAGE_BASE }}.*@FROM ${{ env.IMAGE_BASE }}:base-pr-${{ github.event.pull_request.number }}@g" \
54-
images/ansible-k8s/Dockerfile \
55-
images/fullstacked/Dockerfile
56-
57-
- name: Build github-actions-runner:ansible-k8s
58-
uses: docker/build-push-action@v2
59-
with:
60-
context: ./images/ansible-k8s
61-
push: true
62-
tags: |
63-
${{ env.IMAGE_BASE }}:ansible-k8s-pr-${{ github.event.pull_request.number }}
97+
images/${{ matrix.flavor }}/Dockerfile
6498
65-
- name: Build github-actions-runner:fullstacked
99+
- name: Build github-actions-runner:${{ matrix.flavor }}
66100
uses: docker/build-push-action@v2
67101
with:
68-
context: ./images/fullstacked
102+
context: ./images/${{ matrix.flavor }}
69103
push: true
70104
tags: |
71-
${{ env.IMAGE_BASE }}:fullstacked-pr-${{ github.event.pull_request.number }}
105+
${{ env.IMAGE_BASE }}:${{ matrix.flavor }}-pr-${{ github.event.pull_request.number }}

.github/workflows/create-release.yml

Lines changed: 55 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
secrets:
1919
token: ${{ secrets.GITHUB_TOKEN }}
2020

21-
build:
21+
build_base:
2222
runs-on: ubuntu-latest
2323
needs: create_release
2424
steps:
@@ -47,6 +47,25 @@ jobs:
4747
${{ env.IMAGE_BASE }}:latest-base
4848
${{ env.IMAGE_BASE }}:${{needs.create_release.outputs.version}}-base
4949
50+
build_kaniko-sidecar:
51+
runs-on: ubuntu-latest
52+
needs: create_release
53+
steps:
54+
- name: Check out the repo
55+
uses: actions/checkout@v2
56+
57+
- name: Login to GitHub Container Registry
58+
uses: docker/login-action@v1
59+
with:
60+
registry: ghcr.io
61+
username: ${{ github.repository_owner }}
62+
password: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- name: Set up QEMU
65+
uses: docker/setup-qemu-action@v1
66+
- name: Set up Docker Buildx
67+
uses: docker/setup-buildx-action@v1
68+
5069
- name: Build github-actions-runner:kaniko-sidecar
5170
uses: docker/build-push-action@v2
5271
with:
@@ -56,29 +75,41 @@ jobs:
5675
${{ env.IMAGE_BASE }}:latest-kaniko-sidecar
5776
${{ env.IMAGE_BASE }}:${{needs.create_release.outputs.version}}-kaniko-sidecar
5877
78+
build_flavors:
79+
runs-on: ubuntu-latest
80+
needs: [create_release, build_base]
81+
strategy:
82+
matrix:
83+
flavor: [ansible-k8s, fullstacked]
84+
steps:
85+
- name: Check out the repo
86+
uses: actions/checkout@v2
87+
88+
- name: Login to GitHub Container Registry
89+
uses: docker/login-action@v1
90+
with:
91+
registry: ghcr.io
92+
username: ${{ github.repository_owner }}
93+
password: ${{ secrets.GITHUB_TOKEN }}
94+
95+
- name: Set up QEMU
96+
uses: docker/setup-qemu-action@v1
97+
- name: Set up Docker Buildx
98+
uses: docker/setup-buildx-action@v1
99+
59100
- name: link child image to current version
60101
run: |
61102
sed -i --expression "s@FROM ${{ env.IMAGE_BASE }}.*@FROM ${{ env.IMAGE_BASE }}:${{needs.create_release.outputs.version}}-base@g" \
62-
images/ansible-k8s/Dockerfile \
63-
images/fullstacked/Dockerfile
64-
65-
- name: Build github-actions-runner:ansible-k8s
66-
uses: docker/build-push-action@v2
67-
with:
68-
context: ./images/ansible-k8s
69-
push: true
70-
tags: |
71-
${{ env.IMAGE_BASE }}:latest-ansible-k8s
72-
${{ env.IMAGE_BASE }}:${{needs.create_release.outputs.version}}-ansible-k8s
103+
images/${{ matrix.flavor }}/Dockerfile
73104
74-
- name: Build github-actions-runner:fullstacked
105+
- name: Build github-actions-runner:${{ matrix.flavor }}
75106
uses: docker/build-push-action@v2
76107
with:
77-
context: ./images/fullstacked
108+
context: ./images/${{ matrix.flavor }}
78109
push: true
79110
tags: |
80-
${{ env.IMAGE_BASE }}:latest-fullstacked
81-
${{ env.IMAGE_BASE }}:${{needs.create_release.outputs.version}}-fullstacked
111+
${{ env.IMAGE_BASE }}:latest-${{ matrix.flavor }}
112+
${{ env.IMAGE_BASE }}:${{needs.create_release.outputs.version}}-${{ matrix.flavor }}
82113
83114
publish_release:
84115
runs-on: ubuntu-latest
@@ -94,3 +125,11 @@ jobs:
94125
env:
95126
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96127
ACI_RELEASE_ID: ${{ needs.create_release.outputs.releaseid }}
128+
129+
- name: update helm charts appVersion
130+
uses: peter-evans/repository-dispatch@v2
131+
with:
132+
token: ${{ secrets.HELM_REPO_TOKEN }}
133+
repository: ${{ env.GITHUB_REPOSITORY_OWNER }}/helm-charts
134+
event-type: update_chart_version
135+
client-payload: '{"chart": "github-actions-runner", "version": "${{ needs.create_release.outputs.version }}"}'

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ If you are using `docker` or `podman` the options and commands are basically the
5353

5454
Run registerd to an Organisation:
5555
```bash
56-
docker run -e GH_ORG=fullstack-devops -e GH_ACCESS_TOKEN=ghp_**** github-runner-base:latest
56+
docker run -e GH_ORG=fullstack-devops -e GH_ACCESS_TOKEN=ghp_**** github-actions-runner:latest
5757
```
5858

5959
Run registerd to an Organisation and Repo:
6060
```bash
61-
docker run -e GH_ORG=fullstack-devops -e GH_REPO=github-runner-testing -e GH_ACCESS_TOKEN=ghp_**** github-runner-base:latest
61+
docker run -e GH_ORG=fullstack-devops -e GH_REPO=github-runner-testing -e GH_ACCESS_TOKEN=ghp_**** github-actions-runner:latest
6262
```
6363

6464
> Replace the `ghp_****` with your own valid personal access token

0 commit comments

Comments
 (0)