From a0749b1c69ff810b5d3ff44f15a9c1f1f6669e91 Mon Sep 17 00:00:00 2001 From: Pulumi Bot Date: Thu, 14 Sep 2023 22:56:56 +0000 Subject: [PATCH] [internal] Update GitHub Actions workflow files --- .github/workflows/main.yml | 28 +++++++---------- .github/workflows/master.yml | 28 +++++++---------- .github/workflows/prerelease.yml | 28 +++++++---------- .github/workflows/release.yml | 28 +++++++---------- .github/workflows/run-acceptance-tests.yml | 35 ++++++++++------------ 5 files changed, 59 insertions(+), 88 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9e4ca5c24..87cff7d01b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -176,34 +176,28 @@ jobs: aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control lint: - container: golangci/golangci-lint:v1.54.1 name: lint runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v3 - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Mark repo as safe directory - run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER }}/pulumi-${{ env.PROVIDER }} - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - name: Install Go uses: actions/setup-go@v4 with: cache-dependency-path: | sdk/go.sum go-version: 1.21.x - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 - - run: make lint_provider + - name: disarm go:embed directives to enable lint + run: | + git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' + - name: prepare upstream + continue-on-error: true + run: make upstream + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.1 + working-directory: provider - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3 diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f31e6df05f..e6f77440b7 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -176,34 +176,28 @@ jobs: aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control lint: - container: golangci/golangci-lint:v1.54.1 name: lint runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v3 - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Mark repo as safe directory - run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER }}/pulumi-${{ env.PROVIDER }} - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - name: Install Go uses: actions/setup-go@v4 with: cache-dependency-path: | sdk/go.sum go-version: 1.21.x - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 - - run: make lint_provider + - name: disarm go:embed directives to enable lint + run: | + git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' + - name: prepare upstream + continue-on-error: true + run: make upstream + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.1 + working-directory: provider - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3 diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 1b66ab6c35..32ecb4b698 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -123,34 +123,28 @@ jobs: - go - java lint: - container: golangci/golangci-lint:v1.54.1 name: lint runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v3 - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Mark repo as safe directory - run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER }}/pulumi-${{ env.PROVIDER }} - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - name: Install Go uses: actions/setup-go@v4 with: cache-dependency-path: | sdk/go.sum go-version: 1.21.x - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 - - run: make lint_provider + - name: disarm go:embed directives to enable lint + run: | + git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' + - name: prepare upstream + continue-on-error: true + run: make upstream + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.1 + working-directory: provider - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c33d37280d..b86a53e7ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,34 +136,28 @@ jobs: run: pulumictl create docs-build pulumi-${{ env.PROVIDER }} "${GITHUB_REF#refs/tags/}" lint: - container: golangci/golangci-lint:v1.54.1 name: lint runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v3 - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Mark repo as safe directory - run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER }}/pulumi-${{ env.PROVIDER }} - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - name: Install Go uses: actions/setup-go@v4 with: cache-dependency-path: | sdk/go.sum go-version: 1.21.x - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 - - run: make lint_provider + - name: disarm go:embed directives to enable lint + run: | + git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' + - name: prepare upstream + continue-on-error: true + run: make upstream + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.1 + working-directory: provider - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3 diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 8834a61279..d0bae16b18 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -143,7 +143,6 @@ jobs: repository: ${{ github.event.client_payload.github.payload.repository.full_name }} token: ${{ secrets.PULUMI_BOT_TOKEN }} lint: - container: golangci/golangci-lint:v1.54.1 if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository name: lint @@ -153,28 +152,24 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ env.PR_COMMIT_SHA }} - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Mark repo as safe directory - run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER }}/pulumi-${{ env.PROVIDER }} - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go + - name: disarm go:embed directives to enable lint + run: | + git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' + - name: prepare upstream + continue-on-error: true + run: make upstream + - name: Install go uses: actions/setup-go@v4 with: - cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 + # The versions of golangci-lint and setup-go here cross-depend and need to update together. + go-version: 1.21 + # Either this action or golangci-lint needs to disable the cache + cache: false + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 - - run: make lint_provider + version: v1.54.1 + working-directory: provider - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3