Skip to content

Commit

Permalink
Merge pull request #33 from xunleii/fix-ci
Browse files Browse the repository at this point in the history
fix: repair Terraform workflow (CI)
  • Loading branch information
xunleii authored Aug 25, 2020
2 parents 27ee86f + 756ff02 commit c48a273
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
id: fmt
run: terraform fmt -check -recursive -diff -no-color
continue-on-error: true
- uses: actions/github-script@0.9.0
- uses: actions/github-script@v3
if: steps.fmt.outputs.exitcode != 0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
run: terraform init -no-color
working-directory: examples/hcloud-k3s
continue-on-error: true
- uses: actions/github-script@0.9.0
- uses: actions/github-script@v3
if: steps.init.outputs.exitcode != 0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -72,7 +72,7 @@ jobs:
run: terraform validate -no-color
working-directory: examples/hcloud-k3s
continue-on-error: true
- uses: actions/github-script@0.9.0
- uses: actions/github-script@v3
if: steps.validate.outputs.exitcode != 0
env:
STDOUT: "terraform\n${{ steps.validate.outputs.stdout }}"
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
run: terraform plan -input=false -no-color
working-directory: examples/hcloud-k3s
continue-on-error: true
- uses: actions/github-script@0.9.0
- uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
8 changes: 8 additions & 0 deletions examples/hcloud-k3s/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
hcloud = {
source = "terraform-providers/hcloud"
}
}
required_version = ">= 0.13"
}
File renamed without changes.
10 changes: 0 additions & 10 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
terraform {
required_version = "~> 0.12"
experiments = [variable_validation]
required_providers {
http = "~> 1.2"
null = "~> 2.1"
random = "~> 2.2"
}
}

// Generate the k3s token used by all nodes to join the cluster
resource "random_password" "k3s_cluster_secret" {
length = 48
Expand Down
17 changes: 17 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
http = {
source = "hashicorp/http"
version = "~> 1.2"
}
null = {
source = "hashicorp/null"
version = "~> 2.1"
}
random = {
source = "hashicorp/random"
version = "~> 2.2"
}
}
required_version = ">= 0.13"
}

0 comments on commit c48a273

Please sign in to comment.