Skip to content

fix: Fixing TestRunnerPoolTerragruntDestroyOrder #1038

fix: Fixing TestRunnerPoolTerragruntDestroyOrder

fix: Fixing TestRunnerPoolTerragruntDestroyOrder #1038

Workflow file for this run

name: Build
on:
push:
jobs:
build:
name: Build (${{ matrix.os }}/${{ matrix.arch }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: darwin
arch: amd64
- os: darwin
arch: arm64
- os: linux
arch: "386"
- os: linux
arch: amd64
- os: linux
arch: arm64
- os: windows
arch: "386"
- os: windows
arch: amd64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use mise to install dependencies
uses: jdx/mise-action@v2
with:
version: 2025.4.4
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
- name: Go Build Cache
uses: actions/cache@v4
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}-${{ matrix.os }}-${{ matrix.arch }}
- name: Build Terragrunt
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: |
OUTPUT="bin/terragrunt_${GOOS}_${GOARCH}"
if [[ "${GOOS}" == "windows" ]]; then
OUTPUT="${OUTPUT}.exe"
fi
go build -o "${OUTPUT}" \
-ldflags "-s -w -X github.com/gruntwork-io/go-commons/version.Version=${GITHUB_REF_NAME} -extldflags '-static'" \
.
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: terragrunt_${{ matrix.os }}_${{ matrix.arch }}
path: bin/terragrunt_${{ matrix.os }}_${{ matrix.arch }}*
sign:
name: Sign Binaries
needs: build
runs-on: macos-latest
env:
MISE_PROFILE: cicd
GON_VERSION: v0.0.37
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Prepare build artifacts
run: |
mkdir -p bin
find artifacts -type f -exec cp {} bin/ \;
ls -lahrt bin/*
- name: Use mise to install dependencies
uses: jdx/mise-action@v2
with:
version: 2025.4.4
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache gon binary
id: cache-gon
uses: actions/cache@v4
with:
path: gon
key: gon-${{ env.GON_VERSION }}
- name: Download gon release
if: steps.cache-gon.outputs.cache-hit != 'true'
run: |
curl -L -o gon.zip https://github.com/Bearer/gon/releases/download/${GON_VERSION}/gon_macos.zip
unzip gon.zip
chmod +x gon
- name: Move gon to system path
run: |
sudo mv gon /usr/local/bin/gon
sudo chmod +x /usr/local/bin/gon
- name: Run gon version
run: |
gon --version
- name: Sign Binaries
env:
AC_PASSWORD: ${{ secrets.MACOS_AC_PASSWORD }}
AC_PROVIDER: ${{ secrets.MACOS_AC_PROVIDER }}
AC_USERNAME: ${{ secrets.MACOS_AC_LOGIN }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
run: |
ls -lahrt bin/*
file bin/terragrunt_linux_arm64
.github/scripts/setup/mac-sign.sh .gon_amd64.hcl
.github/scripts/setup/mac-sign.sh .gon_arm64.hcl
echo "Done signing the binary"
codesign -dv --verbose=4 ./bin/terragrunt_darwin_amd64
codesign -dv --verbose=4 ./bin/terragrunt_darwin_arm64
- name: Upload Signed Executables
uses: actions/upload-artifact@v4
with:
name: signed-files
path: bin/*