File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Integration-Tests
2+ description : |
3+ Runs Integrationtests using TestMachinery
4+
5+ on :
6+ push :
7+ workflow_dispatch :
8+
9+ jobs :
10+ run-tests :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ id-token : write
14+ steps :
15+ - uses : actions/checkout@v4
16+ - uses : azure/setup-kubectl@v4
17+ - name : trigger-test
18+ run : |
19+ set -eu
20+
21+ gh_token="${ACTIONS_ID_TOKEN_REQUEST_TOKEN}"
22+ auth_token=$(curl -sLS \
23+ -H "Authorization: Bearer ${gh_token}" \
24+ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=https%3A%2F%2Fgithub.com%2Fgardener \
25+ | jq .value
26+ )
27+
28+ if [ -z "${auth_token}" ]; then
29+ echo "failed to retrieve an auth-token"
30+ exit 1
31+ else
32+ echo "successfully retrieved an auth-token"
33+ fi
34+
35+ # hack: generate kubectl (let us refactor after successful test)
36+ cat <<EOF > kubeconfig
37+ apiVersion: v1
38+ clusters:
39+ - cluster:
40+ certificate-authority-data: TODO
41+ server: https://kube-apiserver-address # TODO
42+ name: cluster
43+ contexts:
44+ - context:
45+ cluster: cluster
46+ user: gha
47+ name: gha
48+ current-context: gha
49+ kind: Config
50+ preferences: {}
51+ users:
52+ - name: gha
53+ user:
54+ token: ${auth_token}
55+ EOF
You can’t perform that action at this time.
0 commit comments