From 41fbaabed2c570341d0fce4c8a0773a0f2c68b01 Mon Sep 17 00:00:00 2001 From: Abhinav Grover Date: Mon, 20 Nov 2023 09:37:19 +0530 Subject: [PATCH] Optimise Github Release wrokflow ref: https://github.com/volterraedge/terraform-provider-volterra/issues/229 --- .github/workflows/go-test.yml | 2 +- .github/workflows/release.yml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 1bcbaf329..d9fd2efd5 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -21,7 +21,7 @@ on: jobs: tests: name: Go Tests - runs-on: ubuntu-latest + runs-on: self-hosted timeout-minutes: 60 steps: - name: Configure git for private modules diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 416677434..94547e3e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,16 +17,22 @@ on: jobs: goreleaser: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 2 # Limit the depth of the Git history fetch - name: Unshallow run: git fetch --prune --unshallow - name: Set up Go 1.19 uses: actions/setup-go@v3 with: go-version: 1.19 + - name: Clean up + run: | + # Remove unnecessary dependencies or cached files + go clean -modcache - name: Import GPG key id: import_gpg uses: paultyng/ghaction-import-gpg@v2.1.0