From f4b8a61981f2e42e0ee020c091e6c342abf334ae Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Tue, 25 Apr 2023 15:26:09 +0200 Subject: [PATCH] Clean workflow files --- .github/actions/fabric-tests/action.yml | 5 +---- .github/workflows/tests.yml | 7 +------ tools/lockfile/main.tf | 12 ++++++------ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/actions/fabric-tests/action.yml b/.github/actions/fabric-tests/action.yml index 148b93c8..ea89b252 100644 --- a/.github/actions/fabric-tests/action.yml +++ b/.github/actions/fabric-tests/action.yml @@ -46,19 +46,16 @@ runs: echo 'disable_checkpoint = true' \ | tee -a /home/runner/.terraformrc mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }} - - name: Download lockfile uses: actions/download-artifact@v3 with: name: lockfile path: tools/lockfile - - - name: Cache Terraform + - name: Download Terraform provider cache uses: actions/cache@v3 with: path: ${{ env.TF_PLUGIN_CACHE_DIR }} key: ${{ runner.os }}-terraform-${{ hashFiles('tools/lockfile/.terraform.lock.hcl') }} - # avoid conflicts with user-installed providers on local machines - name: Pin provider versions shell: bash diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8dbffd54..c22c888a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,17 +53,12 @@ jobs: cd tools/lockfile terraform init -upgrade=true - - name: Cache Terraform + - name: Upload Terraform provider cache uses: actions/cache@v3 with: path: ${{ env.TF_PLUGIN_CACHE_DIR }} key: ${{ runner.os }}-terraform-${{ hashFiles('tools/lockfile/.terraform.lock.hcl') }} - - name: tf provider cache content - shell: bash - run: | - ls -Ra /home/runner/.terraform.d/plugin-cache - - name: Upload lockfile uses: actions/upload-artifact@v3 with: diff --git a/tools/lockfile/main.tf b/tools/lockfile/main.tf index 470e69f4..0aecc3ec 100644 --- a/tools/lockfile/main.tf +++ b/tools/lockfile/main.tf @@ -12,14 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -resource "local_file" "default" {} +data "archive_file" "bundle" {} +resource "azuread_user" "default" {} +resource "azurerm_resource_group" "default" {} +resource "github_branch" "default" {} resource "google_service_account" "sa1" {} resource "google_service_account" "sa2" { provider = google-beta } +resource "local_file" "default" {} resource "random_pet" "default" {} -resource "tls_private_key" "default" {} -resource "github_branch" "default" {} resource "time_static" "default" {} +resource "tls_private_key" "default" {} resource "vsphere_role" "default" {} -resource "azurerm_resource_group" "default" {} -resource "azuread_user" "default" {} -data "archive_file" "bundle" {}