Skip to content

Commit

Permalink
Do some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cnunciato committed Jul 5, 2024
1 parent 3ee0a4e commit 6c35d2a
Show file tree
Hide file tree
Showing 9 changed files with 266 additions and 2,539 deletions.
152 changes: 152 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: CI setup
description: 'Sets up the environment for jobs during CI workflow'

inputs:
node-version:
default: 18.x

python-version:
default: 3.9

go-version:
default: 1.21

dotnet-version:
default: 6

gotestfmt-version:
default: v2.5.0

pulumi-version:
default: dev

google-service-account-email:
default: pulumi-ci@pulumi-ci-gcp-provider.iam.gserviceaccount.com

google-project-number:
default: google-service-account-email

google-workload-identity-pool:
default: pulumi-ci

google-workload-identity-provider:
default: pulumi-ci

aws-access-key-id:
required: true

aws-secret-access-key:
required: true

aws-role-to-assume:
required: true

github-token:
required: true

aws-region:
default: us-west-2

aws-role-duration-seconds:
default: 7200

aws-role-session-name:
default: examples@github-actions

runs:
using: composite
steps:

- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{inputs.dotnet-version}}

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{inputs.node-version}}

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{inputs.python-version}}

- name: Install Python deps
run: |-
pip3 install virtualenv==20.0.23
pip3 install pipenv
shell: bash

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{inputs.go-version}}

- name: Install aws-iam-authenticator
run: >-
curl -o aws-iam-authenticator
https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator
chmod +x ./aws-iam-authenticator
sudo mv aws-iam-authenticator /usr/local/bin
shell: bash

- name: Install Kubectl
run: >-
curl -LO
https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv kubectl /usr/local/bin
shell: bash

- name: Install and configure Helm
run: >-
curl -o- -L
https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
helm init -c
helm repo add bitnami https://charts.bitnami.com/bitnami
shell: bash


- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
service_account: ${{ inputs.google-service-account-email }}
workload_identity_provider: projects/${{ inputs.google-project-number }}/locations/global/workloadIdentityPools/${{ inputs.google-workload-identity-pool }}/providers/${{ inputs.google-workload-identity-provider }}

- name: Install gcloud auth
uses: google-github-actions/setup-gcloud@v2
with:
install_components: gke-gcloud-auth-plugin

- name: Authenticate with Google Cloud Registry
run: gcloud --quiet auth configure-docker
shell: bash

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-region: ${{ inputs.aws-region }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
role-duration-seconds: ${{ inputs.role-duration-seconds }}
role-session-name: ${{ inputs.role-session-name }}
role-to-assume: ${{ inputs.role-to-assume }}

- name: Install Pulumi
uses: pulumi/actions@v5
with:
pulumi-version: ${{ inputs.pulumi-version }}

- run: echo "Currently Pulumi $(pulumi version) is installed"
shell: bash

- name: Install testing dependencies
run: make ensure
shell: bash

- name: Install gotestfmt
uses: GoTestTools/gotestfmt-action@v2
with:
version: ${{ inputs.gotestfmt-version }}
token: ${{ inputs.github-token }}
4 changes: 0 additions & 4 deletions .github/workflows/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Command Dispatch for testing
name: Command dispatch for testing
on:
issue_comment:
types:
Expand All @@ -13,7 +13,7 @@ jobs:
- name: Run Build
uses: peter-evans/slash-command-dispatch@v2
with:
commands: run-example-tests
commands: run-tests
issue-type: pull-request
permission: write
reaction-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading

0 comments on commit 6c35d2a

Please sign in to comment.