Test setup-minikube with harden-runner #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test setup-minikube with harden-runner | |
on: | |
workflow_dispatch: # run test job only | |
permissions: | |
contents: read | |
jobs: | |
test-with-harden-runner: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
#disable-sudo: true | |
egress-policy: audit | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # 3.3.0 | |
- name: Start minikube | |
uses: medyagh/setup-minikube@317d92317e473a10540357f1f4b2878b80ee7b95 # 0.0.16 | |
- name: Deploy cert-manager to minikube | |
run: | | |
helm repo add jetstack https://charts.jetstack.io --force-update | |
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.14.5 --set installCRDs=true | |
echo "waiting for cert-manager pods to be ready..." | |
sleep 5 | |
kubectl wait --for=condition=Ready -n cert-manager --all pods --timeout=60s | |
test-without-harden-runner: | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Harden Runner | |
# uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
# with: | |
# #disable-sudo: true | |
# egress-policy: audit | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # 3.3.0 | |
- name: Start minikube | |
uses: medyagh/setup-minikube@317d92317e473a10540357f1f4b2878b80ee7b95 # 0.0.16 | |
- name: Deploy cert-manager to minikube | |
run: | | |
helm repo add jetstack https://charts.jetstack.io --force-update | |
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.14.5 --set installCRDs=true | |
echo "waiting for cert-manager pods to be ready..." | |
sleep 5 | |
kubectl wait --for=condition=Ready -n cert-manager --all pods --timeout=60s |