Skip to content

Commit ad71d6d

Browse files
committed
Do some cleanup
1 parent 3ee0a4e commit ad71d6d

10 files changed

+254
-2543
lines changed

.github/actions/setup/action.yml

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
name: Setup
2+
description: Sets up the environment for CI runs.
3+
4+
inputs:
5+
aws-access-key-id:
6+
required: true
7+
8+
aws-secret-access-key:
9+
required: true
10+
11+
aws-role-to-assume:
12+
required: true
13+
14+
github-token:
15+
required: true
16+
17+
node-version:
18+
default: 18
19+
20+
python-version:
21+
default: 3.8
22+
23+
go-version:
24+
default: 1.21
25+
26+
dotnet-version:
27+
default: 6
28+
29+
gotestfmt-version:
30+
default: v2.5.0
31+
32+
pulumi-version:
33+
default: dev
34+
35+
google-service-account-email:
36+
37+
38+
google-project-number:
39+
default: 895284651812
40+
41+
google-workload-identity-pool:
42+
default: pulumi-ci
43+
44+
google-workload-identity-provider:
45+
default: pulumi-ci
46+
47+
aws-region:
48+
default: us-west-2
49+
50+
aws-role-duration-seconds:
51+
default: 7200
52+
53+
aws-role-session-name:
54+
default: examples@github-actions
55+
56+
outputs:
57+
aws-access-key-id: ${{ steps.aws-auth.outputs.aws-access-key-id }}
58+
aws-secret-access-key: ${{ steps.aws-auth.outputs.aws-access-key-id }}
59+
aws-session-token: ${{ steps.aws-auth.outputs.aws-session-token }}
60+
aws-region: ${{ inputs.aws-region }}
61+
62+
runs:
63+
using: composite
64+
steps:
65+
66+
- name: Install .NET
67+
uses: actions/setup-dotnet@v4
68+
with:
69+
dotnet-version: ${{inputs.dotnet-version}}
70+
71+
- name: Install Node.js
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: ${{inputs.node-version}}
75+
76+
- name: Install Python
77+
uses: actions/setup-python@v5
78+
with:
79+
python-version: ${{inputs.python-version}}
80+
81+
- name: Install Python deps
82+
run: |
83+
# pip3 install virtualenv==20.0.23
84+
pip3 install pipenv
85+
shell: bash
86+
87+
- name: Install Go
88+
uses: actions/setup-go@v5
89+
with:
90+
go-version: ${{inputs.go-version}}
91+
92+
- name: Install aws-iam-authenticator
93+
run: |
94+
curl https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator -o aws-iam-authenticator
95+
chmod +x ./aws-iam-authenticator
96+
sudo mv aws-iam-authenticator /usr/local/bin
97+
shell: bash
98+
99+
- name: Install Kubectl
100+
run: |
101+
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
102+
chmod +x ./kubectl
103+
sudo mv kubectl /usr/local/bin
104+
shell: bash
105+
106+
- name: Install and configure Helm
107+
run: |
108+
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
109+
helm init -c
110+
helm repo add bitnami https://charts.bitnami.com/bitnami
111+
shell: bash
112+
113+
- name: Install gcloud auth
114+
uses: google-github-actions/setup-gcloud@v2
115+
with:
116+
install_components: gke-gcloud-auth-plugin
117+
118+
- name: Install testing dependencies
119+
run: make ensure
120+
shell: bash
121+
122+
- name: Install gotestfmt
123+
uses: GoTestTools/gotestfmt-action@v2
124+
with:
125+
version: ${{ inputs.gotestfmt-version }}
126+
token: ${{ inputs.github-token }}
127+
128+
- name: Install Pulumi
129+
uses: pulumi/actions@v5
130+
with:
131+
pulumi-version: ${{ inputs.pulumi-version }}
132+
133+
- run: echo "Pulumi $(pulumi version) is installed"
134+
shell: bash
135+
136+
- name: Authenticate with AWS
137+
id: aws-auth
138+
uses: aws-actions/configure-aws-credentials@v4
139+
with:
140+
aws-access-key-id: ${{ inputs.aws-access-key-id }}
141+
aws-region: ${{ inputs.aws-region }}
142+
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
143+
role-duration-seconds: ${{ inputs.role-duration-seconds }}
144+
role-session-name: ${{ inputs.role-session-name }}
145+
role-to-assume: ${{ inputs.role-to-assume }}
146+
output-credentials: true
147+
148+
- name: Authenticate with Google Cloud
149+
uses: google-github-actions/auth@v2
150+
with:
151+
service_account: ${{ inputs.google-service-account-email }}
152+
workload_identity_provider: projects/${{ inputs.google-project-number }}/locations/global/workloadIdentityPools/${{ inputs.google-workload-identity-pool }}/providers/${{ inputs.google-workload-identity-provider }}
153+
154+
- name: Authenticate with Google Cloud Registry
155+
run: gcloud --quiet auth configure-docker
156+
shell: bash

.github/workflows/README.md

-4
This file was deleted.

.github/workflows/command_dispatch.yml .github/workflows/command-dispatch.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Command Dispatch for testing
1+
name: Command dispatch for testing
22
on:
33
issue_comment:
44
types:
@@ -13,7 +13,7 @@ jobs:
1313
- name: Run Build
1414
uses: peter-evans/slash-command-dispatch@v2
1515
with:
16-
commands: run-example-tests
16+
commands: run-tests
1717
issue-type: pull-request
1818
permission: write
1919
reaction-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)