From 857c5381ce0ff9f1f1c929b3431c0f6f52432eec Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Thu, 1 Feb 2024 21:24:16 +0000 Subject: [PATCH] convert bash to pulumi gha --- .github/workflows/kind.yaml | 41 ++++++++++++++++++++++++------------- Pulumi.ci.yaml | 2 ++ 2 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 Pulumi.ci.yaml diff --git a/.github/workflows/kind.yaml b/.github/workflows/kind.yaml index 3f42ec5..7e9263a 100644 --- a/.github/workflows/kind.yaml +++ b/.github/workflows/kind.yaml @@ -39,6 +39,9 @@ jobs: with: fetch-depth: 1 + - uses: pulumi/actions@v5 + id: pulumi-install + - name: Kubernetes KinD Cluster uses: helm/kind-action@v1.8.0 with: @@ -73,20 +76,30 @@ jobs: kubectl config get-contexts kubectl cluster-info --context kind-kargo - - id: pulumi-up - name: Deploy Pulumi IaC - env: - KUBECONFIG: .kube/config - ACTIONS_STEP_DEBUG: true - PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - source .envrc - pulumi login - pulumi install - pulumi stack select --create dev - pulumi config set kubernetes kind - pulumi up --refresh --skip-preview + - uses: pulumi/actions@v5 + id: pulumi-up + with: + command: up + work-dir: ./ + cloud-url: file://$GITHUB_WORKSPACE/.pulumi + refresh: true + secrets-provider: passphrase + stack-name: ci + +# - id: pulumi-up +# name: Deploy Pulumi IaC +# env: +# KUBECONFIG: .kube/config +# ACTIONS_STEP_DEBUG: true +# PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: | +# source .envrc +# pulumi login +# pulumi install +# pulumi stack select --create dev +# pulumi config set kubernetes kind +# pulumi up --refresh --skip-preview - id: pulumi-destroy name: Wait for Kind Kubernetes API to be Ready diff --git a/Pulumi.ci.yaml b/Pulumi.ci.yaml new file mode 100644 index 0000000..7930f77 --- /dev/null +++ b/Pulumi.ci.yaml @@ -0,0 +1,2 @@ +config: + kargo:kubernetes: kind