fix(ci): configure git identity before annotated Go SDK tag push #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Pulumi CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "pulumi/**" | |
| - "internal/**" | |
| - "go.mod" | |
| - "go.sum" | |
| - ".github/workflows/pulumi-*.yml" | |
| - ".golangci.yml" | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "pulumi/**" | |
| - "internal/**" | |
| - "go.mod" | |
| - "go.sum" | |
| - ".github/workflows/pulumi-*.yml" | |
| - ".golangci.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| # Cancel in-progress PR runs on new pushes; let main runs finish to | |
| # preserve post-merge signal history. | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| prerequisites: | |
| name: Prerequisites | |
| uses: ./.github/workflows/pulumi-prerequisites.yml | |
| lint: | |
| name: Lint | |
| # Depend on prerequisites so lint auto-skips on schema drift failures. | |
| needs: prerequisites | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: pulumi/provider/go.mod | |
| cache: true | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| working-directory: pulumi/provider | |
| args: --config ../../.golangci.yml ./... | |
| # Provider binary build is handled by pulumi-release.yml on tag push. | |
| # A fast goreleaser config check catches syntax errors without a full build. | |
| goreleaser_check: | |
| name: GoReleaser Config Check | |
| needs: prerequisites | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Validate goreleaser config | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: "~> v2" | |
| workdir: pulumi | |
| args: check --config .goreleaser.pulumi.yml | |
| generate_sdk_python: | |
| name: Generate Python SDK | |
| needs: prerequisites | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: pulumi/provider/go.mod | |
| cache: true | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Download schema artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: "schema*" | |
| path: pulumi/provider/cmd/pulumi-resource-flashblade/ | |
| merge-multiple: true | |
| - name: Download bridge-metadata artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bridge-metadata | |
| path: pulumi/provider/cmd/pulumi-resource-flashblade/ | |
| # SKIP_TFGEN=1 + _from_schema targets consume the downloaded schema | |
| # instead of re-running the tfgen schema subcommand. | |
| - name: Test Python SDK build (schema pre-fetched) | |
| working-directory: pulumi | |
| run: make SKIP_TFGEN=1 test_python_sdk_from_schema | |
| generate_sdk_go: | |
| name: Generate Go SDK | |
| needs: prerequisites | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: pulumi/provider/go.mod | |
| cache: true | |
| - name: Download schema artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: "schema*" | |
| path: pulumi/provider/cmd/pulumi-resource-flashblade/ | |
| merge-multiple: true | |
| - name: Download bridge-metadata artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bridge-metadata | |
| path: pulumi/provider/cmd/pulumi-resource-flashblade/ | |
| - name: Test Go SDK build (schema pre-fetched) | |
| working-directory: pulumi | |
| run: make SKIP_TFGEN=1 test_go_sdk_from_schema |