From 298a802e82608a91f559016950571a6e83d8d100 Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Thu, 1 Oct 2020 12:57:55 -0600 Subject: [PATCH] refactor: require a terraform version now BREAKING CHANGE: a version action variable is now required. Terraform is version picky and I don't want to make bumping defaults a chore here. --- .github/workflows/release.yml | 1 + .github/workflows/test.yml | 7 ++++++- README.md | 6 ++++-- action.yml | 3 +-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9166fbf..36f2fe3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: # setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED registry-url: 'https://registry.npmjs.org' - run: npm i + - run: npm test - uses: bcomnes/npm-bump@v2.0.1 with: git_email: 12core@littlstar.com diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e42e2ff..3ca8957 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,9 @@ name: Tests on: [push] +env: + tf-version: 0.13.4 + jobs: build: @@ -9,7 +12,7 @@ jobs: strategy: matrix: - node-version: [12.x] + node-version: [14] steps: - uses: actions/checkout@v1 @@ -23,6 +26,8 @@ jobs: npm test - name: Install Terraform uses: little-core-labs/install-terraform@master + with: + version: ${{ env.tf-version }} - name: Terraform version run: | terraform version diff --git a/README.md b/README.md index 6f387b8..95a9562 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Create a workflow `.yml` file in your repositories `.github/workflows` directory ### Inputs -- `version`: The version of terraform to install. Default: 0.12.21 +- `version`: The version of terraform to install. Required. ### Outputs @@ -37,7 +37,9 @@ jobs: steps: - uses: actions/checkout@v1 - name: Install Terraform - uses: little-core-labs/install-terraform@v1 + uses: little-core-labs/install-terraform@v2.0.0 + with: + version: 0.13.4 - name: Terraform apply run: | terraform init diff --git a/action.yml b/action.yml index 218f205..a95871f 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,5 @@ runs: inputs: version: description: 'Version of terraform to download' - required: false - default: 0.12.21 + required: true # outputs: none