Files
pulumi-dokploy/.gitea/workflows/build.yml
T
max-voitcov 466e162efe
build / build (push) Successful in 10m48s
Keep the schema check honest across a version bump
The build job regenerates schema.json and diffs it against the checked-in
copy, to catch a resources.go edit that never got a `make tfgen`. The comment
above it claimed the schema carries no version. It does: tfgen writes the
upstream version into `packageDescription`.

So the job, which builds at the Makefile's default VERSION, regenerated a
schema stamped v0.1.0 and diffed it against the committed v0.2.0 one. The
v0.2.0 push failed on a mismatch that had nothing to do with the mapping.

Bump the default to match the committed schema and say plainly in both places
that the two move together. Verified by running the job's exact command --
`make provider` with no override, then the diff -- which now exits 0.

The release job was unaffected: it derives VERSION from the tag.
2026-08-26 01:32:04 +03:00

91 lines
2.8 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, so a diff here
# means someone edited resources.go without re-running `make tfgen`.
#
# schema.json *does* carry the upstream version, in `packageDescription`,
# and this job builds at the Makefile's default VERSION. So the default
# has to be bumped in the same commit that regenerates the schema for a
# release, or this step fails on a mismatch that has nothing to do with
# the mapping. That is exactly how it failed for v0.2.0.
- 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