This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
E2E #16
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: E2E | |
on: | |
workflow_run: | |
workflows: | |
- Trigger-E2E | |
types: | |
- completed | |
jobs: | |
e2e: | |
runs-on: ubuntu-latest | |
permissions: | |
statuses: write | |
id-token: write | |
contents: read | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Run the action # You would run your tests before this using the output to set state/desc | |
uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
context: "E2E Tests" | |
description: "Running E2E tests" | |
state: 'pending' | |
sha: ${{ github.event.workflow_run.head_sha }} | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
with: | |
ref: ${{ github.event.workflow_run.head_branch }} | |
- name: Install yq | |
uses: mikefarah/yq@6609ed76ecb69f9d8254345292d90ea72f641715 # v4.35.1 | |
- name: Set up Helm | |
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 | |
with: | |
version: v3.11.2 | |
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 | |
with: | |
python-version: 3.8 | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 | |
- name: Setup G Cloud SDK | |
uses: google-github-actions/setup-gcloud@v1 | |
- name: Setup chainctl | |
uses: chainguard-dev/actions/setup-chainctl@main | |
with: | |
# The Chainguard identity to assume when talking to Enforce. | |
identity: ${{ secrets.CHAINCTL_IDENTITY }} | |
- run: | | |
INVITE_CODE=$(chainctl iam invite create ${{ secrets.CHAINCTL_E2E_GROUP }} --cluster -ojson | jq -r '.code') | |
yq -i '.inviteCode = ${INVITE_CODE}' charts/enforce-agent/ci/ci-values.yaml | |
- name: Create KIND Cluster | |
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 | |
- name: Run chart-testing (install) | |
run: ct install --config ct.yaml | |
- name: Run the action # You would run your tests before this using the output to set state/desc | |
if: ${{ success() }} | |
uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
context: "E2E Tests" | |
description: "passed!" | |
state: 'success' | |
sha: ${{ github.event.workflow_run.head_sha }} | |
- name: Run the action # You would run your tests before this using the output to set state/desc | |
if: ${{ failure() }} | |
uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
context: "E2E Tests" | |
description: "E2E failed!" | |
state: 'failure' | |
sha: ${{ github.event.workflow_run.head_sha }} |