From ee2c353221f5ffe73a705c22d0017dd2c04be825 Mon Sep 17 00:00:00 2001 From: diana esteves Date: Mon, 5 Aug 2024 13:14:40 -0500 Subject: [PATCH 1/7] update workflows --- .github/workflows/branch.yml | 54 +++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 .github/workflows/branch.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml new file mode 100644 index 0000000..f72d0cb --- /dev/null +++ b/.github/workflows/branch.yml @@ -0,0 +1,54 @@ +name: branch + +on: + pull_request: + branches: [ "main" ] + workflow_dispatch: + +permissions: + contents: read + pull-requests: write + id-token: write + +jobs: + pulumi-preview: + name: pulumi-preview + runs-on: ubuntu-latest + steps: + - name: checkout repo + uses: actions/checkout@v4 + + # Best practice: use a short-lived to auth to Pulumi Cloud + # The OIDC Issuer must be properly configured in the Pulumi Organization + # For more information, see + # https://www.pulumi.com/docs/pulumi-cloud/oidc/client/github/ + - name: setup short-lived token + uses: pulumi/auth-actions@v1 + with: + organization: pulumi-sandbox-diana + requested-token-type: urn:pulumi:token-type:access_token:organization + + - name: set up node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: install app deps + working-directory: ./app + run: npm install + # TODO -- need to build? + + - name: install infra deps + working-directory: ./infra + run: npm install + + - name: preview resources + uses: pulumi/actions@v5 + with: + command: preview + stack-name: diana-pulumi-corp/cloudflare-workers-ai/prod + work-dir: ./infra + comment-on-pr: true + comment-on-summary: true + edit-pr-comment: true + \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..bd97e5f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,55 @@ +name: main + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pull-requests: write + id-token: write + +jobs: + pulumi-up: + name: pulumi-up + runs-on: ubuntu-latest + steps: + - name: checkout repo + uses: actions/checkout@v4 + + # Best practice: use a short-lived to auth to Pulumi Cloud + # The OIDC Issuer must be properly configured in the Pulumi Organization + # For more information, see + # https://www.pulumi.com/docs/pulumi-cloud/oidc/client/github/ + - name: setup short-lived token + uses: pulumi/auth-actions@v1 + with: + organization: pulumi-sandbox-diana + requested-token-type: urn:pulumi:token-type:access_token:organization + + - name: set up node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: install app deps + working-directory: ./app + run: npm install + # TODO -- need to build? + + - name: install infra deps + working-directory: ./infra + run: npm install + + - name: upsert resources + uses: pulumi/actions@v5 + with: + command: up + stack-name: diana-pulumi-corp/cloudflare-workers-ai/prod + work-dir: ./infra + comment-on-pr: true + comment-on-summary: true + edit-pr-comment: true + \ No newline at end of file From 085e308ae3df655507987c276269b7a0994dbace Mon Sep 17 00:00:00 2001 From: diana esteves Date: Mon, 5 Aug 2024 13:52:01 -0500 Subject: [PATCH 2/7] noop From c051748d7ea2d19acc7db732a9106bfde59db09e Mon Sep 17 00:00:00 2001 From: diana esteves Date: Mon, 5 Aug 2024 14:00:38 -0500 Subject: [PATCH 3/7] update stack fqn --- .github/workflows/branch.yml | 3 +-- .github/workflows/main.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index f72d0cb..4e8ae3a 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -46,9 +46,8 @@ jobs: uses: pulumi/actions@v5 with: command: preview - stack-name: diana-pulumi-corp/cloudflare-workers-ai/prod + stack-name: pulumi-sandbox-diana/cloudflare-workers-ai/prod work-dir: ./infra comment-on-pr: true comment-on-summary: true edit-pr-comment: true - \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd97e5f..436ecca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,9 +47,8 @@ jobs: uses: pulumi/actions@v5 with: command: up - stack-name: diana-pulumi-corp/cloudflare-workers-ai/prod + stack-name: pulumi-sandbox-diana/cloudflare-workers-ai/prod work-dir: ./infra comment-on-pr: true comment-on-summary: true edit-pr-comment: true - \ No newline at end of file From 0eff5b017830fc8c683c73488233471e8802b62a Mon Sep 17 00:00:00 2001 From: diana esteves Date: Mon, 5 Aug 2024 14:05:24 -0500 Subject: [PATCH 4/7] noop From 670769821df1a85f27060663e8fbee2dfe70a8e1 Mon Sep 17 00:00:00 2001 From: diana esteves Date: Mon, 5 Aug 2024 14:09:05 -0500 Subject: [PATCH 5/7] noop From 10d63731a391bc8fa402e26d4f07392c62ae6a26 Mon Sep 17 00:00:00 2001 From: diana esteves Date: Mon, 5 Aug 2024 14:12:32 -0500 Subject: [PATCH 6/7] noop From 172e24ebb57861c089c730c5525b749cc7190a8e Mon Sep 17 00:00:00 2001 From: diana esteves Date: Mon, 5 Aug 2024 14:16:10 -0500 Subject: [PATCH 7/7] noop