Forgot about secrets #129
Workflow file for this run
This file contains 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: CI | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
setup: | |
name: Setup | |
runs-on: ubuntu-latest | |
outputs: | |
goreleaser: ${{ steps.goreleaser.outputs.any_changed }} | |
lint: ${{ steps.lint.outputs.any_changed }} | |
buf: ${{ steps.buf.outputs.any_changed }} | |
provisioner: ${{ steps.provisioner.outputs.any_changed || steps.test.outputs.any_changed || github.actor == 'renovate[bot]' }} | |
provider: ${{ steps.provider.outputs.any_changed || steps.test.outputs.any_changed || github.actor == 'renovate[bot]' }} | |
sdk: ${{ steps.sdk.outputs.any_changed || steps.provider.outputs.any_changed || github.actor == 'renovate[bot]' }} | |
test: ${{ steps.test.outputs.any_changed || steps.provisioner.outputs.any_changed || steps.provider.outputs.any_changed || github.actor == 'renovate[bot]' }} | |
steps: | |
- name: Chekcout | |
uses: actions/checkout@v4 | |
- name: Goreleaser triggers | |
id: goreleaser | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
.github/workflows/** | |
.goreleaser.yml | |
- name: Lint triggers | |
id: lint | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
.github/workflows/** | |
provider/**/*.go | |
sdk/**/*.go | |
tests/**/*.go | |
- name: Buf triggers | |
id: buf | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
.github/workflows/** | |
proto/**/*.proto | |
buf.gen.yaml | |
buf.lock | |
buf.yaml | |
- name: SDK triggers | |
id: sdk | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
.github/workflows/** | |
sdk/** | |
- name: Provisioner triggers | |
id: provisioner | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
.github/workflows/** | |
gen/**/*.go | |
provider/cmd/provisioner/** | |
provider/pkg/** | |
provider/*go* | |
- name: Provider triggers | |
id: provider | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
.github/workflows/** | |
gen/**/*.go | |
provider/cmd/provider/** | |
provider/pkg/** | |
provider/*go* | |
- name: Test triggers | |
id: test | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
.github/workflows/** | |
test/** | |
goreleaser: | |
if: needs.setup.outputs.goreleaser == 'true' | |
name: GoReleaser Check | |
runs-on: ubuntu-latest | |
needs: [setup] | |
steps: | |
- name: Chekcout | |
uses: actions/checkout@v4 | |
- uses: goreleaser/goreleaser-action@v6 | |
with: | |
args: check | |
version: '~> v2' | |
lint: | |
if: needs.setup.outputs.lint == 'true' | |
name: Lint | |
runs-on: ubuntu-latest | |
needs: [setup] | |
strategy: | |
matrix: | |
module: | |
- provider | |
- sdk | |
- tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: ${{ matrix.module }}/go.mod | |
cache-dependency-path: ${{ matrix.module }}/go.sum | |
- name: golangci-lint ${{ matrix.module }} | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59 | |
working-directory: ${{ matrix.module }} | |
buf: | |
if: needs.setup.outputs.buf == 'true' | |
name: Buf | |
runs-on: ubuntu-latest | |
needs: [setup] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup buf | |
uses: bufbuild/buf-setup-action@v1 | |
with: | |
version: 1.35.1 | |
github_token: ${{ github.token }} | |
- name: Get changed files | |
id: diff | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
**/*.proto | |
- name: Lint | |
if: ${{ steps.diff.outputs.any_changed == 'true' }} | |
uses: bufbuild/buf-lint-action@v1 | |
with: | |
input: ${{ steps.diff.outputs.all_changed_files }} | |
- name: Buf breaking | |
if: false # Lots of breaking changes in v1alpha1 | |
uses: bufbuild/buf-breaking-action@v1 | |
with: | |
input: ${{ steps.diff.outputs.all_changed_files }} | |
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main,ref=HEAD~1" | |
provisioner: | |
if: needs.setup.outputs.provisioner == 'true' | |
name: Provisioner | |
runs-on: ubuntu-latest | |
needs: [setup] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: provider/go.mod | |
cache-dependency-path: provider/go.sum | |
- name: Install pulumictl | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: pulumi/pulumictl | |
- name: Make | |
run: make provisioner | |
- name: Check worktree clean | |
uses: pulumi/git-status-check-action@v1 | |
with: | |
allowed-changes: | | |
sdk/**/pulumi-plugin.json | |
sdk/dotnet/Pulumi.*.csproj | |
sdk/go/**/pulumiUtilities.go | |
sdk/nodejs/package.json | |
sdk/python/pyproject.toml | |
continue-with-unexpected-changes: true | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: provisioner | |
path: bin/provisioner | |
provider: | |
if: needs.setup.outputs.provider == 'true' | |
name: Provider | |
runs-on: ubuntu-latest | |
needs: [setup] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: provider/go.mod | |
cache-dependency-path: provider/go.sum | |
- name: Install pulumictl | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: pulumi/pulumictl | |
- name: Install Pulumi | |
uses: pulumi/actions@v5 | |
with: | |
pulumi-version-file: .versions/pulumi | |
- name: Make | |
run: make provider | |
- name: Check worktree clean | |
uses: pulumi/git-status-check-action@v1 | |
with: | |
allowed-changes: | | |
sdk/**/pulumi-plugin.json | |
sdk/dotnet/Pulumi.*.csproj | |
sdk/go/**/pulumiUtilities.go | |
sdk/nodejs/package.json | |
sdk/python/pyproject.toml | |
continue-with-unexpected-changes: true | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
with: | |
path: bin/pulumi-resource-baremetal | |
name: provider | |
sdk: | |
if: needs.setup.outputs.sdk == 'true' | |
name: SDKs | |
needs: [setup, provider] | |
uses: ./.github/workflows/sdk.yml | |
with: | |
release: false | |
test: | |
if: needs.setup.outputs.test == 'true' | |
name: Tests | |
runs-on: ubuntu-latest | |
needs: [setup, provisioner] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: tests/go.mod | |
cache-dependency-path: tests/go.sum | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Install Pulumi | |
uses: pulumi/actions@v5 | |
with: | |
pulumi-version-file: .versions/pulumi | |
- name: Install pulumictl | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: pulumi/pulumictl | |
- name: Download provisioner | |
uses: actions/download-artifact@v4 | |
with: | |
name: provisioner | |
path: bin | |
- run: chmod +x bin/provisioner | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha | |
context: . | |
file: provider/cmd/provisioner/Dockerfile | |
- name: Test | |
run: make test_provider |