From 08927072115e02796b61883ac6c3ef22d098f84f Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Tue, 7 Jan 2025 03:18:56 +0000 Subject: [PATCH] Regenerate workflows for pulumi-grafana --- .github/actions/setup-tools/action.yml | 6 +++--- .github/actions/upload-sdk/action.yml | 2 +- .github/workflows/build_provider.yml | 2 +- .github/workflows/prerequisites.yml | 6 +++--- .github/workflows/resync-build.yml | 2 +- Makefile | 2 +- upstream.sh | 21 +++++++++++++++++++++ 7 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/actions/setup-tools/action.yml b/.github/actions/setup-tools/action.yml index f84c2c8f..49a7c5ad 100644 --- a/.github/actions/setup-tools/action.yml +++ b/.github/actions/setup-tools/action.yml @@ -66,19 +66,19 @@ runs: - name: Setup DotNet if: inputs.tools == 'all' || contains(inputs.tools, 'dotnet') - uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4 + uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0 with: dotnet-version: 6.0.x - name: Setup Python if: inputs.tools == 'all' || contains(inputs.tools, 'python') - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: 3.11.8 - name: Setup Java if: inputs.tools == 'all' || contains(inputs.tools, 'java') - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4 + uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 with: cache: gradle distribution: temurin diff --git a/.github/actions/upload-sdk/action.yml b/.github/actions/upload-sdk/action.yml index b0dd1404..bea11eed 100644 --- a/.github/actions/upload-sdk/action.yml +++ b/.github/actions/upload-sdk/action.yml @@ -13,7 +13,7 @@ runs: shell: bash run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} . - name: Upload artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: ${{ inputs.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz diff --git a/.github/workflows/build_provider.yml b/.github/workflows/build_provider.yml index c0413717..95672f75 100644 --- a/.github/workflows/build_provider.yml +++ b/.github/workflows/build_provider.yml @@ -66,7 +66,7 @@ jobs: run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }} - name: Upload artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: pulumi-resource-grafana-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz path: bin/pulumi-resource-grafana-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index 7118e201..bca608d8 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -71,7 +71,7 @@ jobs: - name: Unit-test provider code run: make test_provider - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1 + uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - if: inputs.is_pr @@ -96,14 +96,14 @@ jobs: 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. - name: Upload pulumi-tfgen-grafana - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: pulumi-tfgen-grafana path: ${{ github.workspace }}/bin/pulumi-tfgen-grafana retention-days: 30 - name: Upload schema-embed.json - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: schema-embed.json path: provider/cmd/pulumi-resource-grafana/schema-embed.json diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml index 652241ad..3f525810 100644 --- a/.github/workflows/resync-build.yml +++ b/.github/workflows/resync-build.yml @@ -27,7 +27,7 @@ jobs: run: | make ci-mgmt - name: Create PR (no linked issue) - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 + uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: author: pulumi-bot base: main diff --git a/Makefile b/Makefile index b101a283..66463991 100644 --- a/Makefile +++ b/Makefile @@ -258,7 +258,7 @@ bin/$(TFGEN): provider/*.go provider/go.* .make/upstream # Apply patches to the upstream submodule, if it exists upstream: .make/upstream # Re-run if the upstream commit or the patches change -.make/upstream: $(wildcard patches/*) $(wildcard .git/modules/upstream/HEAD) +.make/upstream: $(wildcard patches/*) $(shell ./upstream.sh file_target) ifneq ("$(wildcard upstream)","") ./upstream.sh init endif diff --git a/upstream.sh b/upstream.sh index ce90039c..736b9854 100755 --- a/upstream.sh +++ b/upstream.sh @@ -23,6 +23,7 @@ COMMANDS check_in Write checkedout commits back to patches, add upstream and patches changes to the git staging area and exit checkout mode. + file_target Print a file path to depend on in make. help Print this help message, plus examples. OPTIONS @@ -334,6 +335,23 @@ re-initializing using updated patches and updated upstream base. EOF } +# file_target prints a file path to depend on in make to trigger an init when required. +# Also updates the file timestamp if the submodule needs updating. +file_target() { + path=.git/modules/upstream/HEAD + # Don't print a file if it doesn't exist - it's probably not initialized yet. + if [[ ! -f "${path}" ]]; then + exit 0 + fi + # If the submodule is changed, touch the file to trigger a re-init. + desired_commit=$(git ls-tree HEAD upstream | cut -d ' ' -f3 | cut -f1 || true) + current_commit=$(cat "${path}") + if [[ "${desired_commit}" != "${current_commit}" ]]; then + touch "${path}" + fi + echo "${path}" +} + if [[ -z ${original_cmd} ]]; then echo "Error: command is required." echo @@ -372,6 +390,9 @@ case ${original_cmd} in check_in|checkin) check_in "$@" ;; + file_target) + file_target "$@" + ;; *) echo "Error: unknown command \"${original_cmd}\"." echo