You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-21Lines changed: 32 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,9 +77,9 @@ First we need to create 5 new GitHub Repository Secrets (encrypted variables) in
77
77
78
78
We should start to create a new Pulumi Access Token `PULUMI_ACCESS_TOKEN` at https://app.pulumi.com/jonashackt/settings/tokens
79
79
80
-
Now we need to create the Azure specific variables (see the docs https://github.com/pulumi/actions#microsoft-azure):
80
+
Now we need to create the Azure specific variables (see the docs https://github.com/pulumi/actions#microsoft-azure).
81
81
82
-
`ARM_SUBSCRIPTION_ID`
82
+
For the `ARM_SUBSCRIPTION_ID` run a `az account show` (after you logged your CLI into your Azure subscription via `azure login`) and use the value of `"id":`.
83
83
84
84
For the other 3 variables we need to create a new Azure Service Principal (https://www.pulumi.com/docs/intro/cloud-providers/azure/setup/#creating-a-service-principal), which [is the recommended way](https://www.pulumi.com/docs/intro/cloud-providers/azure/setup/#service-principal-authentication):
- name: In order to use the Pulumi v2+ action, we need to setup the Pulumi project specific language environment
124
+
uses: actions/setup-node@v2
124
125
with:
125
-
command: preview
126
-
stack-name: github-$GITHUB_RUN_ID
126
+
node-version: '14'
127
127
128
-
up:
129
-
runs-on: ubuntu-latest
130
-
needs: preview
131
-
steps:
132
-
- uses: actions/checkout@v2
128
+
- name: After setting up the Pulumi project specific language environment, we need to install the dependencies also (see https://github.com/pulumi/actions#example-workflows)
129
+
run: npm install
133
130
134
-
- uses: pulumi/actions@v2
131
+
- name: Install Pulumi CLI so that we can create a GHA pipeline specific Pulumi Stack
- name: Remove the GHA pipeline specific Pulumi Stack
158
+
run: |
159
+
pulumi stack rm github-${{ github.run_id }} -y
150
160
```
151
161
152
162
We use the possibility [to define the environment variables on the workflow's top level](https://docs.github.com/en/actions/reference/environment-variables) to reduce the 3 definition to one. Also we define a `stack-name` containing the `GITHUB_RUN_ID` which is one of [the default GHA environment variables](https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables) which is defined as:
@@ -163,6 +173,7 @@ To learn more about possible reasons and resolution, visit https://www.pulumi.co
163
173
164
174
```
165
175
176
+
See this https://stackoverflow.com/questions/66563656/pulumi-with-github-actions-crashing-parallel-workflows-with-error-409-conflic/66563657#66563657
166
177
167
178
Using this simply workflow, the first `preview` job needs to finish successfully before the `up` job starts:
0 commit comments