Skip to content

Commit 4101d0f

Browse files
authored
Update GitHub Actions workflows. (#645)
This PR was automatically generated by the update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt repo, from commit 5207a4a8412bdc112aa08153ab692248720d61c4.
1 parent 3d4dc55 commit 4101d0f

File tree

7 files changed

+36
-29
lines changed

7 files changed

+36
-29
lines changed

.github/actions/upload-sdk/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
shell: bash
1414
run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} .
1515
- name: Upload artifacts
16-
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
16+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
1717
with:
1818
name: ${{ inputs.language }}-sdk.tar.gz
1919
path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz

.github/workflows/build_provider.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ jobs:
3636
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3737
with:
3838
persist-credentials: false
39+
# Without ldid cross-compiling Node binaries on a Linux worker intended to work on darwin-arm64 fails to sign the
40+
# binaries properly and they do not work as expected. See https://github.com/pulumi/pulumi-awsx/issues/1490
41+
- uses: MOZGIII/install-ldid-action@v1
42+
with:
43+
tag: v2.1.5-procursus2
3944
- name: Setup tools
4045
uses: ./.github/actions/setup-tools
4146
with:
@@ -66,7 +71,7 @@ jobs:
6671
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
6772

6873
- name: Upload artifacts
69-
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
74+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
7075
with:
7176
name: pulumi-resource-postgresql-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz
7277
path: bin/pulumi-resource-postgresql-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
continue-on-error: true
4949
run: make prepare_local_workspace
5050
- name: golangci-lint
51-
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6
51+
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6
5252
with:
5353
version: v1.60
5454
working-directory: provider

.github/workflows/prerequisites.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ jobs:
9898
Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes.
9999
100100
- name: Upload codegen binary for postgresql
101-
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
101+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
102102
with:
103103
name: pulumi-tfgen-postgresql
104104
path: ${{ github.workspace }}/bin/pulumi-tfgen-postgresql
105105
retention-days: 30
106106

107107
- name: Upload schema-embed.json
108-
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
108+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
109109
with:
110110
name: schema-embed.json
111111
path: provider/cmd/pulumi-resource-postgresql/schema-embed.json

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,6 @@ jobs:
210210
with:
211211
providerVersion: ${{ inputs.version }}
212212
# Prelease is run often but we only have 5 concurrent macos runners, so we only test after the stable release.
213-
enableMacosRunner: ${{ inputs.isPrerelease == false }}
213+
enableMacRunner: ${{ inputs.isPrerelease == false }}
214214
skipGoSdk: ${{ inputs.skipGoSdk }}
215215
pythonVersion: ${{ needs.publish_sdk.outputs.python_version }}

.github/workflows/verify-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626
description: "The version of the provider to verify"
2727
required: true
2828
type: string
29-
enableMacosRunner:
29+
enableMacRunner:
3030
description: "Enable the macos-latest runner in addition to ubuntu-latest and windows-latest. Defaults to 'false'."
3131
required: false
3232
type: boolean

Makefile

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CODEGEN := pulumi-tfgen-$(PACK)
99
PROVIDER := pulumi-resource-$(PACK)
1010
JAVA_GEN := pulumi-java-gen
1111
TESTPARALLELISM := 10
12+
GOTESTARGS := ""
1213
WORKING_DIR := $(shell pwd)
1314
PULUMI_PROVIDER_BUILD_PARALLELISM ?=
1415
PULUMI_CONVERT := 1
@@ -221,29 +222,30 @@ lint_provider: provider
221222
lint_provider.fix:
222223
cd provider && golangci-lint run --path-prefix provider -c ../.golangci.yml --fix
223224
.PHONY: lint_provider lint_provider.fix
225+
build_provider_cmd = cd provider && GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o "$(3)" -ldflags "$(LDFLAGS)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(PROVIDER)
226+
227+
provider: bin/$(PROVIDER)
224228

225229
# `make provider_no_deps` builds the provider binary directly, without ensuring that
226230
# `cmd/pulumi-resource-postgresql/schema.json` is valid and up to date.
227231
# To create a release ready binary, you should use `make provider`.
228-
build_provider_cmd = cd provider && CGO_ENABLED=0 go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o "$(1)" -ldflags "$(LDFLAGS)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(PROVIDER)
229-
provider: bin/$(PROVIDER)
230232
provider_no_deps:
231-
$(call build_provider_cmd,$(WORKING_DIR)/bin/$(PROVIDER))
233+
$(call build_provider_cmd,$(shell go env GOOS),$(shell go env GOARCH),$(WORKING_DIR)/bin/$(PROVIDER))
232234
bin/$(PROVIDER): .make/schema
233-
$(call build_provider_cmd,$(WORKING_DIR)/bin/$(PROVIDER))
235+
$(call build_provider_cmd,$(shell go env GOOS),$(shell go env GOARCH),$(WORKING_DIR)/bin/$(PROVIDER))
234236
.PHONY: provider provider_no_deps
235237

236238
test: export PATH := $(WORKING_DIR)/bin:$(PATH)
237239
test:
238-
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h
240+
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS)
239241
.PHONY: test
240-
242+
test_provider_cmd = cd provider && go test -v -short \
243+
-coverprofile="coverage.txt" \
244+
-coverpkg="./...,github.com/hashicorp/terraform-provider-..." \
245+
-parallel $(TESTPARALLELISM) \
246+
./...
241247
test_provider:
242-
cd provider && go test -v -short \
243-
-coverprofile="coverage.txt" \
244-
-coverpkg="./...,github.com/hashicorp/terraform-provider-..." \
245-
-parallel $(TESTPARALLELISM) \
246-
./...
248+
$(call test_provider_cmd)
247249
.PHONY: test_provider
248250

249251
tfgen: schema
@@ -322,18 +324,18 @@ SKIP_SIGNING ?=
322324

323325
# These targets assume that the schema-embed.json exists - it's generated by tfgen.
324326
# We disable CGO to ensure that the binary is statically linked.
325-
bin/linux-amd64/$(PROVIDER): export GOOS := linux
326-
bin/linux-amd64/$(PROVIDER): export GOARCH := amd64
327-
bin/linux-arm64/$(PROVIDER): export GOOS := linux
328-
bin/linux-arm64/$(PROVIDER): export GOARCH := arm64
329-
bin/darwin-amd64/$(PROVIDER): export GOOS := darwin
330-
bin/darwin-amd64/$(PROVIDER): export GOARCH := amd64
331-
bin/darwin-arm64/$(PROVIDER): export GOOS := darwin
332-
bin/darwin-arm64/$(PROVIDER): export GOARCH := arm64
333-
bin/windows-amd64/$(PROVIDER).exe: export GOOS := windows
334-
bin/windows-amd64/$(PROVIDER).exe: export GOARCH := amd64
327+
bin/linux-amd64/$(PROVIDER): GOOS := linux
328+
bin/linux-amd64/$(PROVIDER): GOARCH := amd64
329+
bin/linux-arm64/$(PROVIDER): GOOS := linux
330+
bin/linux-arm64/$(PROVIDER): GOARCH := arm64
331+
bin/darwin-amd64/$(PROVIDER): GOOS := darwin
332+
bin/darwin-amd64/$(PROVIDER): GOARCH := amd64
333+
bin/darwin-arm64/$(PROVIDER): GOOS := darwin
334+
bin/darwin-arm64/$(PROVIDER): GOARCH := arm64
335+
bin/windows-amd64/$(PROVIDER).exe: GOOS := windows
336+
bin/windows-amd64/$(PROVIDER).exe: GOARCH := amd64
335337
bin/%/$(PROVIDER) bin/%/$(PROVIDER).exe: bin/jsign-6.0.jar
336-
$(call build_provider_cmd,$(WORKING_DIR)/$@)
338+
$(call build_provider_cmd,$(GOOS),$(GOARCH),$(WORKING_DIR)/$@)
337339

338340
@# Only sign windows binary if fully configured.
339341
@# Test variables set by joining with | between and looking for || showing at least one variable is empty.

0 commit comments

Comments
 (0)