Skip to content

Commit f0c5072

Browse files
ringodspulumi-bot
andauthored
Regenerate workflows for pulumi-grafana (#223)
Co-authored-by: pulumi-bot <[email protected]>
1 parent 479e27d commit f0c5072

File tree

7 files changed

+31
-10
lines changed

7 files changed

+31
-10
lines changed

.github/actions/setup-tools/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@ runs:
6666

6767
- name: Setup DotNet
6868
if: inputs.tools == 'all' || contains(inputs.tools, 'dotnet')
69-
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4
69+
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
7070
with:
7171
dotnet-version: 6.0.x
7272

7373
- name: Setup Python
7474
if: inputs.tools == 'all' || contains(inputs.tools, 'python')
75-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
75+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
7676
with:
7777
python-version: 3.11.8
7878

7979
- name: Setup Java
8080
if: inputs.tools == 'all' || contains(inputs.tools, 'java')
81-
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
81+
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
8282
with:
8383
cache: gradle
8484
distribution: temurin

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

+1-1
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
16+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
1717
with:
1818
name: ${{ inputs.language }}-sdk.tar.gz
1919
path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz

.github/workflows/build_provider.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
6767

6868
- name: Upload artifacts
69-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
69+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
7070
with:
7171
name: pulumi-resource-grafana-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz
7272
path: bin/pulumi-resource-grafana-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz

.github/workflows/prerequisites.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Unit-test provider code
7272
run: make test_provider
7373
- name: Upload coverage reports to Codecov
74-
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
74+
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
7575
env:
7676
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7777
- if: inputs.is_pr
@@ -96,14 +96,14 @@ jobs:
9696
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.
9797
9898
- name: Upload pulumi-tfgen-grafana
99-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
99+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
100100
with:
101101
name: pulumi-tfgen-grafana
102102
path: ${{ github.workspace }}/bin/pulumi-tfgen-grafana
103103
retention-days: 30
104104

105105
- name: Upload schema-embed.json
106-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
106+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
107107
with:
108108
name: schema-embed.json
109109
path: provider/cmd/pulumi-resource-grafana/schema-embed.json

.github/workflows/resync-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
make ci-mgmt
2929
- 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
3131
with:
3232
author: pulumi-bot <[email protected]>
3333
base: main

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ bin/$(TFGEN): provider/*.go provider/go.* .make/upstream
258258
# Apply patches to the upstream submodule, if it exists
259259
upstream: .make/upstream
260260
# 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)
262262
ifneq ("$(wildcard upstream)","")
263263
./upstream.sh init
264264
endif

upstream.sh

+21
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ COMMANDS
2323
check_in Write checkedout commits back to patches, add upstream
2424
and patches changes to the git staging area and exit
2525
checkout mode.
26+
file_target Print a file path to depend on in make.
2627
help Print this help message, plus examples.
2728
2829
OPTIONS
@@ -334,6 +335,23 @@ re-initializing using updated patches and updated upstream base.
334335
EOF
335336
}
336337

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+
337355
if [[ -z ${original_cmd} ]]; then
338356
echo "Error: command is required."
339357
echo
@@ -372,6 +390,9 @@ case ${original_cmd} in
372390
check_in|checkin)
373391
check_in "$@"
374392
;;
393+
file_target)
394+
file_target "$@"
395+
;;
375396
*)
376397
echo "Error: unknown command \"${original_cmd}\"."
377398
echo

0 commit comments

Comments
 (0)