diff --git a/.config/mise.toml b/.config/mise.toml index b533d52..f11c2f3 100644 --- a/.config/mise.toml +++ b/.config/mise.toml @@ -17,7 +17,7 @@ python = '3.11.8' java = 'corretto-11' # Executable tools -pulumi = "{{ get_env(name='PULUMI_VERSION_MISE', default='latest') }}" +"github:pulumi/pulumi" = "{{ get_env(name='PULUMI_VERSION_MISE', default='latest') }}" "github:pulumi/pulumictl" = '0.0.50' "github:pulumi/schema-tools" = "0.6.0" "aqua:gradle/gradle-distributions" = '7.6.6' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63e64e3..4101fd8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -562,26 +562,6 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ steps.esc-secrets.outputs.SLACK_WEBHOOK_URL }} lint: - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - lfs: true - persist-credentials: false - ref: ${{ env.PR_COMMIT_SHA }} - - name: Setup Tools - uses: ./.github/actions/setup-tools - with: - github_token: ${{ steps.app-auth.outputs.token }} - - name: Disarm go:embed directives to enable linters that compile source code - run: git grep -l 'go:embed' -- provider | xargs --no-run-if-empty sed -i - 's/go:embed/ goembed/g' - - name: golangci-lint provider pkg - uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 - with: - install-mode: none # Handled by mise. - working-directory: . name: lint - if: github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository + uses: ./.github/workflows/lint.yml + secrets: inherit diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..4d24e30 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,57 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + +name: lint + +on: + workflow_call: + inputs: {} + +env: + PROVIDER: docker-build + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + TRAVIS_OS_NAME: linux + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + GOVERSION: "1.21.x" + NODEVERSION: "20.x" + PYTHONVERSION: "3.11.8" + DOTNETVERSION: "8.0.x" + JAVAVERSION: "11" + ARM_CLIENT_ID: 30e520fa-12b4-4e21-b473-9426c5ac2e1e + ARM_SUBSCRIPTION_ID: 0282681f-7a9e-424b-80b2-96babd57a8a1 + ARM_TENANT_ID: 706143bc-e1d4-4593-aee2-c9dc60ab9be7 + AWS_REGION: us-west-2 + AZURE_LOCATION: westus + GOOGLE_CI_SERVICE_ACCOUNT_EMAIL: pulumi-ci@pulumi-ci-gcp-provider.iam.gserviceaccount.com + GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci + GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci + GOOGLE_PROJECT: pulumi-ci-gcp-provider + GOOGLE_PROJECT_NUMBER: "895284651812" + GOOGLE_REGION: us-central1 + GOOGLE_ZONE: us-central1-a + PULUMI_API: https://api.pulumi-staging.io + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + lfs: true + persist-credentials: false + ref: ${{ env.PR_COMMIT_SHA }} + - name: Setup Tools + uses: ./.github/actions/setup-tools + with: + github_token: ${{ steps.app-auth.outputs.token }} + - name: Disarm go:embed directives to enable linters that compile source code + run: git grep -l 'go:embed' -- provider | xargs --no-run-if-empty sed -i + 's/go:embed/ goembed/g' + - name: golangci-lint provider pkg + uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 + with: + install-mode: none # Handled by mise. + working-directory: . + name: lint + if: github.event_name == 'repository_dispatch' || + github.event.pull_request.head.repo.full_name == github.repository