Some checks failed
build / build (push) Failing after 49s
Two separate CI failures: - The cross-repo checkout of terraform-provider-dokploy asked the API for the default branch and got "not found", failing the build. An explicit ref: main skips the lookup entirely. - setup-go caches by default, and this runner's cache server is unreachable from job containers, so restore and save each block until they time out. The same change cut the upstream provider's build from 15m46s to 2m37s.
86 lines
2.5 KiB
YAML
86 lines
2.5 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch: {}
|
|
|
|
env:
|
|
GO_VERSION: "1.25.x"
|
|
NODE_VERSION: "20.x"
|
|
PYTHON_VERSION: "3.11"
|
|
DOTNET_VERSION: "8.0.x"
|
|
# provider/go.mod carries a local `replace` for the upstream Terraform
|
|
# provider, so it has to sit next to this checkout under this exact name.
|
|
UPSTREAM_REPO: usr_unknown/terraform-provider-dokploy
|
|
UPSTREAM_DIR: dokploy-teraform
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout pulumi-dokploy
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: pulumi-dokploy
|
|
|
|
- name: Checkout upstream Terraform provider
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ${{ env.UPSTREAM_REPO }}
|
|
path: ${{ env.UPSTREAM_DIR }}
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
# Without an explicit ref, checkout asks the API for the default
|
|
# branch and fails on this Gitea with "not found".
|
|
ref: main
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
# The runner's cache server is unreachable from job containers, so
|
|
# every restore/save hangs until timeout. Re-enable once fixed.
|
|
cache: false
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
|
|
- uses: pulumi/actions@v6
|
|
|
|
- name: Lint provider
|
|
working-directory: pulumi-dokploy
|
|
run: make lint
|
|
|
|
- name: Build provider plugin
|
|
working-directory: pulumi-dokploy
|
|
run: make provider
|
|
|
|
# schema.json and bridge-metadata.json are checked in and carry no
|
|
# version, so they only change when the mapping does. A diff here means
|
|
# someone edited resources.go without re-running `make tfgen`.
|
|
- name: Fail if the checked-in schema is stale
|
|
working-directory: pulumi-dokploy
|
|
run: git diff --exit-code -- provider/cmd/pulumi-resource-dokploy/schema.json
|
|
provider/cmd/pulumi-resource-dokploy/bridge-metadata.json
|
|
|
|
- name: Build SDKs
|
|
working-directory: pulumi-dokploy
|
|
run: make build_sdks
|
|
|
|
- name: Build Go SDK
|
|
working-directory: pulumi-dokploy/sdk
|
|
run: go build ./...
|
|
|
|
- name: Build .NET SDK
|
|
working-directory: pulumi-dokploy/sdk/dotnet
|
|
run: dotnet build --nologo
|