Skip to content

feat: use opentofu schema and opentofu registry #44

feat: use opentofu schema and opentofu registry

feat: use opentofu schema and opentofu registry #44

Workflow file for this run

name: build
on:
push:
branches: [main]
pull_request:
branches-ignore: [pre-release]
env:
GOPROXY: https://proxy.golang.org/
jobs:
generate-provider-schemas:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: .go-version
- name: Install OpenTofu
uses: opentofu/setup-opentofu@v1
with:
tofu_wrapper: false
tofu_version: 1.8.0
- name: Generate provider schemas
run: |
go generate ./internal/schemas
du -h -s ./internal/schemas/data
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: provider-schema-data
path: ./internal/schemas/data
retention-days: 1
build:
runs-on: ubuntu-latest
needs: [generate-provider-schemas]
strategy:
matrix:
include:
- {goos: linux, goarch: '386'}
- {goos: linux, goarch: amd64}
- {goos: linux, goarch: arm}
- {goos: linux, goarch: arm64}
- {goos: freebsd, goarch: '386'}
- {goos: freebsd, goarch: amd64}
- {goos: freebsd, goarch: arm}
- {goos: openbsd, goarch: '386'}
- {goos: openbsd, goarch: amd64}
- {goos: solaris, goarch: amd64}
- {goos: windows, goarch: '386'}
- {goos: windows, goarch: amd64}
- {goos: windows, goarch: arm64}
- {goos: darwin, goarch: arm64}
- {goos: darwin, goarch: amd64}
timeout-minutes: 25
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Download provider schemas
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: provider-schema-data
path: ./internal/schemas/data
- name: Check provider schemas
run: du -h -s ./internal/schemas/data
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: .go-version
- name: ${{ matrix.goos }} ${{ matrix.goarch }} build
run: go build -trimpath -buildvcs=false -ldflags "-s -w"