Skip to content

Commit cb14caf

Browse files
authored
[internal] Update GitHub Actions workflow files (#263)
1 parent a24721c commit cb14caf

File tree

7 files changed

+38
-11
lines changed

7 files changed

+38
-11
lines changed

β€Ž.github/workflows/main.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
177177
aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control
178178
lint:
179-
container: golangci/golangci-lint:v1.51
179+
container: golangci/golangci-lint:v1.54.1
180180
name: lint
181181
runs-on: ubuntu-latest
182182
steps:

β€Ž.github/workflows/master.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
177177
aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control
178178
lint:
179-
container: golangci/golangci-lint:v1.51
179+
container: golangci/golangci-lint:v1.54.1
180180
name: lint
181181
runs-on: ubuntu-latest
182182
steps:

β€Ž.github/workflows/prerelease.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
- go
124124
- java
125125
lint:
126-
container: golangci/golangci-lint:v1.51
126+
container: golangci/golangci-lint:v1.54.1
127127
name: lint
128128
runs-on: ubuntu-latest
129129
steps:

β€Ž.github/workflows/release.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
run: pulumictl create docs-build pulumi-${{ env.PROVIDER }}
137137
"${GITHUB_REF#refs/tags/}"
138138
lint:
139-
container: golangci/golangci-lint:v1.51
139+
container: golangci/golangci-lint:v1.54.1
140140
name: lint
141141
runs-on: ubuntu-latest
142142
steps:

β€Ž.github/workflows/run-acceptance-tests.ymlβ€Ž

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
144144
token: ${{ secrets.PULUMI_BOT_TOKEN }}
145145
lint:
146-
container: golangci/golangci-lint:v1.51
146+
container: golangci/golangci-lint:v1.54.1
147147
if: github.event_name == 'repository_dispatch' ||
148148
github.event.pull_request.head.repo.full_name == github.repository
149149
name: lint
@@ -260,16 +260,43 @@ jobs:
260260
fields: repo,commit,author,action
261261
status: ${{ job.status }}
262262
sentinel:
263-
if: github.event_name == 'repository_dispatch' ||
264-
github.event.pull_request.head.repo.full_name == github.repository
265263
name: sentinel
264+
# We would like to be able to specify `sentinel` as the only required job for this
265+
# workflow. To do that, we need `sentinel` to succeed only when it is safe to
266+
# merge and fail in all other cases.
267+
#
268+
# We can't use the default `if: success()`, since GitHub interprets a skipped job as a
269+
# success, and by default a dependee job failing will skip a dependent job. That means
270+
# if a test step fails, then it will skip `sentinel` so GitHub will register
271+
# `sentinel` as succeeded.
272+
#
273+
# GitHub documents `jobs.result` as:
274+
#
275+
# The result of a job in the reusable workflow. Possible values are success,
276+
# failure, cancelled, or skipped.
277+
#
278+
# GitHub documents `cancelled()` as:
279+
#
280+
# Returns true if the workflow was canceled.
281+
#
282+
# Combining these terms gives us an intuitive definition of success:
283+
#
284+
# We have succeeded when no dependent workflow has failed and the job was
285+
# not cancelled.
286+
#
287+
if: (github.event_name == 'repository_dispatch' ||
288+
github.event.pull_request.head.repo.full_name == github.repository) &&
289+
! cancelled()
266290
needs:
267291
- test
268292
- lint
269293
runs-on: ubuntu-latest
270294
steps:
271-
- name: Is workflow a success
272-
run: echo yes
295+
- name: Workflow is not a success
296+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
297+
run: exit 1
298+
- name: Workflow is a success
299+
run: echo "πŸŽ‰πŸŽˆπŸŽ‰πŸŽˆπŸŽ‰"
273300
test:
274301
if: github.event_name == 'repository_dispatch' ||
275302
github.event.pull_request.head.repo.full_name == github.repository

β€Ž.github/workflows/upgrade-bridge.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Call upgrade provider action
12-
uses: pulumi/pulumi-upgrade-provider-action@v0.0.5
12+
uses: pulumi/pulumi-upgrade-provider-action@v0.0.6
1313
with:
1414
kind: bridge
1515
- env:

β€Ž.github/workflows/upgrade-provider.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Call upgrade provider action
13-
uses: pulumi/pulumi-upgrade-provider-action@v0.0.5
13+
uses: pulumi/pulumi-upgrade-provider-action@v0.0.6
1414
with:
1515
kind: all
1616
- env:

0 commit comments

Comments
Β (0)