Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Pull Request

on:
pull_request:

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
cache: true

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.7.0"

- name: Setup Go environment
run: |
echo "GOPATH=$HOME/go" >> $GITHUB_ENV
echo "GOBIN=$HOME/go/bin" >> $GITHUB_ENV
echo "$HOME/go/bin" >> $GITHUB_PATH
mkdir -p $HOME/go/bin

- name: Cache Terraform plugin generators
id: cache-terraform-plugins
uses: actions/cache@v4
with:
path: ~/go/bin
key: ${{ runner.os }}-terraform-plugins-go-${{ hashFiles('go.mod') }}-v1
restore-keys: |
${{ runner.os }}-terraform-plugins-go-

- name: Install Terraform plugin generators
if: steps.cache-terraform-plugins.outputs.cache-hit != 'true'
run: |
go install github.com/hashicorp/terraform-plugin-codegen-openapi/cmd/tfplugingen-openapi@latest
go install github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework@latest

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Generate provider code
run: |
echo "Running codegen to generate provider code from OpenAPI spec..."
make codegen

- name: Run GoReleaser (Build Only)
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
with:
args: build --clean --snapshot
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,7 @@ make test-clean && make test
## License

This project is licensed under the Mozilla Public License 2.0 - see the [LICENSE](LICENSE) file for details.



TODO REMOVE THIS LINE (triggering gha on a branch)