This repository was archived by the owner on Feb 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +79
-7
lines changed
Expand file tree Collapse file tree 5 files changed +79
-7
lines changed Original file line number Diff line number Diff line change 4646 push : true
4747 tags : |
4848 ${{ env.IMAGE_BASE }}:kaniko-sidecar-pr-${{ github.event.pull_request.number }}
49+
50+ - name : link child image to current pr
51+ run : sed "s/FROM.*/FROM ${{ env.IMAGE_BASE }}:base-pr-${{ github.event.pull_request.number }}/g" images/ansible-k8s/Dockerfile
52+
53+ - name : Build github-actions-runner:ansible-k8s
54+ uses : docker/build-push-action@v2
55+ with :
56+ context : ./images/ansible-k8s
57+ push : true
58+ tags : |
59+ ${{ env.IMAGE_BASE }}:ansible-k8s-pr-${{ github.event.pull_request.number }}
Original file line number Diff line number Diff line change @@ -10,16 +10,23 @@ jobs:
1010 runs-on : ubuntu-latest
1111 steps :
1212 - name : Delete base image
13- uses : bots-house/ghcr-delete-image-action@v1
13+ uses : bots-house/ghcr-delete-image-action@v1.0.0
1414 with :
1515 owner : ${{ github.repository_owner }}
1616 name : github-actions-runner
1717 token : ${{ secrets.GITHUB_TOKEN }}
1818 tag : base-pr-${{ github.event.pull_request.number }}
1919 - name : Delete kaniko-sidecar image
20- uses : bots-house/ghcr-delete-image-action@v1
20+ uses : bots-house/ghcr-delete-image-action@v1.0.0
2121 with :
2222 owner : ${{ github.repository_owner }}
2323 name : github-actions-runner
2424 token : ${{ secrets.GITHUB_TOKEN }}
25- tag : kaniko-sidecar-pr-${{ github.event.pull_request.number }}
25+ tag : kaniko-sidecar-pr-${{ github.event.pull_request.number }}
26+ - name : Delete kaniko-sidecar image
27+ uses : bots-house/ghcr-delete-image-action@v1.0.0
28+ with :
29+ owner : ${{ github.repository_owner }}
30+ name : github-actions-runner
31+ token : ${{ secrets.GITHUB_TOKEN }}
32+ tag : ansible-k8s-pr-${{ github.event.pull_request.number }}
Original file line number Diff line number Diff line change @@ -43,17 +43,18 @@ jobs:
4343 context : ./images/base
4444 push : true
4545 tags : |
46- ${IMAGE_BASE}:latest
47- ${IMAGE_BASE}:base-latest
48- ${IMAGE_BASE}:base-${{needs.create_release.outputs.version}}
46+ ${{ env. IMAGE_BASE } }:latest
47+ ${{ env. IMAGE_BASE } }:base-latest
48+ ${{ env. IMAGE_BASE } }:base-${{needs.create_release.outputs.version}}
4949
5050 - name : Build github-actions-runner:kaniko-sidecar
5151 uses : docker/build-push-action@v2
5252 with :
5353 context : ./images/kaniko-sidecar
5454 push : true
5555 tags : |
56- ${IMAGE_BASE}:kaniko-sidecar-${{needs.create_release.outputs.version}}
56+ ${{ env.IMAGE_BASE }}:kaniko-sidecar-latest
57+ ${{ env.IMAGE_BASE }}:kaniko-sidecar-${{needs.create_release.outputs.version}}
5758
5859 publish_release :
5960 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ FROM ghcr.io/fullstack-devops/github-actions-runner:base-latest
2+
3+ USER root
4+ # install packages along with jq so we can parse JSON
5+ # add additional packages as necessary
6+ ARG PACKAGES="ansible"
7+
8+ RUN apt-get update \
9+ && apt-get install -y --no-install-recommends ${PACKAGES} \
10+ && rm -rf /var/lib/apt/lists/* \
11+ && apt-get clean
12+
13+ ENV GH_RUNNER_LABELS="ubuntu-20.04,ansible-k8s"
14+ ARG KUBECTL_VERSION=1.21.0
15+ ARG HELM_VERSION=3.6.3
16+
17+ # Install kubectl
18+ RUN wget -q https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -O /usr/local/bin/kubectl \
19+ && chmod +x /usr/local/bin/kubectl
20+
21+ # Install helm
22+ RUN wget -q https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm \
23+ && chmod +x /usr/local/bin/helm
24+
25+ ENV TMP_DIR=/home/${USERNAME}/tmp
26+
27+ RUN mkdir /home/${USERNAME}/.ansible
28+ RUN mkdir ${TMP_DIR}
29+
30+ COPY requirements.yml ${TMP_DIR}/requirements.yml
31+
32+ RUN chown -R ${USERNAME} /home/${USERNAME}
33+
34+ USER ${USERNAME}
35+
36+ RUN ansible-galaxy install -c -r ${TMP_DIR}/requirements.yml
37+ RUN ansible-galaxy collection install -c -r ${TMP_DIR}/requirements.yml
38+
39+ # install helm plugins helm push, appr && diff
40+ RUN helm plugin install --version 0.10.2 https://github.com/chartmuseum/helm-push.git \
41+ && helm plugin install --version 0.7.0 https://github.com/app-registry/appr-helm-plugin.git \
42+ && helm plugin install --version 3.4.2 https://github.com/databus23/helm-diff
Original file line number Diff line number Diff line change 1+ ---
2+ roles :
3+ - name : geerlingguy.helm
4+ version : 1.0.0
5+
6+ collections :
7+ - name : kubernetes.core
8+ version : 1.2.0
9+
10+ - name : community.kubernetes
11+ version : 1.0.0
You can’t perform that action at this time.
0 commit comments