-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a shared workflow from shared-workflows repo
- Loading branch information
Showing
9 changed files
with
60 additions
and
146 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,9 @@ | ||
name: Terraform CI | ||
|
||
on: push | ||
on: | ||
push: | ||
merge_group: | ||
types: [checks_requested] | ||
|
||
jobs: | ||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v1 | ||
|
||
- uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: "1.5" | ||
|
||
# note: we can only validate the example atm. see https://github.com/hashicorp/terraform/issues/28490 | ||
- run: terraform init -backend=false | ||
working-directory: examples/basic-aws-integration | ||
|
||
- run: terraform validate | ||
working-directory: examples/basic-aws-integration | ||
|
||
- run: terraform fmt -recursive -check | ||
build: | ||
uses: meshcloud/shared-workflows/.github/workflows/terraform-meshplatform-modules-build-workflow.yml@main |
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
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
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ pkgs ? import <nixpkgs> { }, system ? builtins.currentSystem }: | ||
|
||
let | ||
# fake opentofu as terraform so that tools like terraform-docs pre-commit hook (which doesn't have tofu support) | ||
# fall back to tofu | ||
tofu_terraform = | ||
pkgs.stdenv.mkDerivation { | ||
name = "tofu-terraform"; | ||
phases = [ "installPhase" ]; | ||
installPhase = '' | ||
mkdir -p $out/bin | ||
echo '#!/usr/bin/env sh' > $out/bin/terraform | ||
echo 'tofu $@' > $out/bin/terraform | ||
chmod +x $out/bin/terraform | ||
''; | ||
}; | ||
|
||
in | ||
|
||
pkgs.mkShell { | ||
NIX_SHELL = "terraform-meshplatform-modules"; | ||
shellHook = '' | ||
echo starting terraform-meshplatform-modules shell | ||
''; | ||
|
||
buildInputs = [ | ||
pkgs.pre-commit | ||
pkgs.opentofu | ||
pkgs.tflint | ||
pkgs.terraform-docs | ||
|
||
# fake tofu as terraform | ||
tofu_terraform | ||
]; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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