File tree 7 files changed +31
-10
lines changed
7 files changed +31
-10
lines changed Original file line number Diff line number Diff line change @@ -66,19 +66,19 @@ runs:
66
66
67
67
- name : Setup DotNet
68
68
if : inputs.tools == 'all' || contains(inputs.tools, 'dotnet')
69
- uses : actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4
69
+ uses : actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
70
70
with :
71
71
dotnet-version : 6.0.x
72
72
73
73
- name : Setup Python
74
74
if : inputs.tools == 'all' || contains(inputs.tools, 'python')
75
- uses : actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
75
+ uses : actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
76
76
with :
77
77
python-version : 3.11.8
78
78
79
79
- name : Setup Java
80
80
if : inputs.tools == 'all' || contains(inputs.tools, 'java')
81
- uses : actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
81
+ uses : actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
82
82
with :
83
83
cache : gradle
84
84
distribution : temurin
Original file line number Diff line number Diff line change 13
13
shell : bash
14
14
run : tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} .
15
15
- name : Upload artifacts
16
- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
16
+ uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
17
17
with :
18
18
name : ${{ inputs.language }}-sdk.tar.gz
19
19
path : ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz
Original file line number Diff line number Diff line change 66
66
run : make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
67
67
68
68
- name : Upload artifacts
69
- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
69
+ uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
70
70
with :
71
71
name : pulumi-resource-grafana-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz
72
72
path : bin/pulumi-resource-grafana-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz
Original file line number Diff line number Diff line change 71
71
- name : Unit-test provider code
72
72
run : make test_provider
73
73
- name : Upload coverage reports to Codecov
74
- uses : codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
74
+ uses : codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
75
75
env :
76
76
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
77
77
- if : inputs.is_pr
@@ -96,14 +96,14 @@ jobs:
96
96
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.
97
97
98
98
- name : Upload pulumi-tfgen-grafana
99
- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
99
+ uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
100
100
with :
101
101
name : pulumi-tfgen-grafana
102
102
path : ${{ github.workspace }}/bin/pulumi-tfgen-grafana
103
103
retention-days : 30
104
104
105
105
- name : Upload schema-embed.json
106
- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
106
+ uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
107
107
with :
108
108
name : schema-embed.json
109
109
path : provider/cmd/pulumi-resource-grafana/schema-embed.json
Original file line number Diff line number Diff line change 27
27
run : |
28
28
make ci-mgmt
29
29
- name : Create PR (no linked issue)
30
- uses : peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
30
+ uses : peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
31
31
with :
32
32
author :
pulumi-bot <[email protected] >
33
33
base : main
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ bin/$(TFGEN): provider/*.go provider/go.* .make/upstream
258
258
# Apply patches to the upstream submodule, if it exists
259
259
upstream : .make/upstream
260
260
# Re-run if the upstream commit or the patches change
261
- .make/upstream : $(wildcard patches/* ) $(wildcard .git/modules/ upstream/HEAD )
261
+ .make/upstream : $(wildcard patches/* ) $(shell ./ upstream.sh file_target )
262
262
ifneq ("$(wildcard upstream) ","")
263
263
./upstream.sh init
264
264
endif
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ COMMANDS
23
23
check_in Write checkedout commits back to patches, add upstream
24
24
and patches changes to the git staging area and exit
25
25
checkout mode.
26
+ file_target Print a file path to depend on in make.
26
27
help Print this help message, plus examples.
27
28
28
29
OPTIONS
@@ -334,6 +335,23 @@ re-initializing using updated patches and updated upstream base.
334
335
EOF
335
336
}
336
337
338
+ # file_target prints a file path to depend on in make to trigger an init when required.
339
+ # Also updates the file timestamp if the submodule needs updating.
340
+ file_target () {
341
+ path=.git/modules/upstream/HEAD
342
+ # Don't print a file if it doesn't exist - it's probably not initialized yet.
343
+ if [[ ! -f " ${path} " ]]; then
344
+ exit 0
345
+ fi
346
+ # If the submodule is changed, touch the file to trigger a re-init.
347
+ desired_commit=$( git ls-tree HEAD upstream | cut -d ' ' -f3 | cut -f1 || true)
348
+ current_commit=$( cat " ${path} " )
349
+ if [[ " ${desired_commit} " != " ${current_commit} " ]]; then
350
+ touch " ${path} "
351
+ fi
352
+ echo " ${path} "
353
+ }
354
+
337
355
if [[ -z ${original_cmd} ]]; then
338
356
echo " Error: command is required."
339
357
echo
@@ -372,6 +390,9 @@ case ${original_cmd} in
372
390
check_in|checkin)
373
391
check_in " $@ "
374
392
;;
393
+ file_target)
394
+ file_target " $@ "
395
+ ;;
375
396
* )
376
397
echo " Error: unknown command \" ${original_cmd} \" ."
377
398
echo
You can’t perform that action at this time.
0 commit comments