From 9568289cc88006bcd91b5fcaf44ba44bfcbf0527 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Tue, 13 Feb 2024 08:45:40 +0100 Subject: [PATCH] chore(build): use official go distribution --- .../composite/bootstrap-go/action.yml | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/.github/workflows/composite/bootstrap-go/action.yml b/.github/workflows/composite/bootstrap-go/action.yml index d6070665..63f93482 100644 --- a/.github/workflows/composite/bootstrap-go/action.yml +++ b/.github/workflows/composite/bootstrap-go/action.yml @@ -7,31 +7,6 @@ branding: runs: using: "composite" steps: - - name: Install Go 🚀 - env: - VERSION: "1.22.0" - shell: pwsh - run: | - # Delete conflicting go versions first - Remove-Item -Path "$env:RUNNER_TOOL_CACHE/go" -Recurse -Force -ErrorAction Ignore - - # Download source - $tempZip = "$env:RUNNER_TEMP/source.zip" - Invoke-WebRequest "https://github.com/jandedobbeleer/go/releases/download/$env:VERSION/go.zip" -OutFile $tempZip - - # Extract to correct location - Expand-Archive $tempZip -DestinationPath $env:RUNNER_TEMP -Force - $sourceFolder = Join-Path $env:RUNNER_TOOL_CACHE "go" - New-Item -ItemType Directory -Path $sourceFolder - Move-Item "$env:RUNNER_TEMP/go/*" $sourceFolder -Force - - # Set correct permissions on go executables - chmod a+x "$sourceFolder/bin/go" 2>&1 - Get-ChildItem "$sourceFolder/pkg/tool/linux_amd64" | ForEach-Object { - chmod a+x $_ 2>&1 - } - - # Add to path - "$sourceFolder/bin" >> $env:GITHUB_PATH - "GOROOT=$sourceFolder" >> $env:GITHUB_ENV - "GOPATH=$sourceFolder" >> $env:GITHUB_ENV + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 + with: + go-version: '1.22.0'