Skip to content

build(deps): bump github.com/aws/aws-sdk-go-v2/service/kinesis (#1122) #478

build(deps): bump github.com/aws/aws-sdk-go-v2/service/kinesis (#1122)

build(deps): bump github.com/aws/aws-sdk-go-v2/service/kinesis (#1122) #478

Workflow file for this run

name: CI
on:
workflow_dispatch:
inputs:
run_release:
description: 'Run the release job (for testing)'
type: boolean
default: false
push:
branches: [master]
pull_request:
branches: [master]
release:
types: [created]
jobs:
lint:
if: github.event_name != 'release'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for --new-from-rev
- name: Fetch master branch for comparison
run: git fetch origin master:refs/remotes/origin/master
- name: Install mise
uses: jdx/mise-action@v3
with:
version: 2025.12.10
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Go module cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: go mod download
- name: Check resource naming conventions
run: ./scripts/check-resource-naming.sh
- name: Run golangci-lint
run: golangci-lint run --new-from-rev=origin/master ./...
test:
if: github.event_name != 'release'
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install mise
uses: jdx/mise-action@v3
with:
version: 2025.12.10
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Go module cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: go mod download
- name: Run tests
run: |
mkdir -p /tmp/logs
go test -v -timeout 45m -parallel 4 ./... 2>&1 | tee /tmp/logs/all.log
env:
DISABLE_TELEMETRY: "true"
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test-logs
path: /tmp/logs/
integration-test:
needs: lint
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install mise
uses: jdx/mise-action@v3
with:
version: 2025.12.10
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::087285199408:role/cloud-nuke-gha
aws-region: us-east-1
- name: Go module cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: go mod download
- name: Validate nuke config (parse test)
env:
DISABLE_TELEMETRY: "true"
run: |
output=$(go test -v -run '^TestNukeConfigFile$' ./config/... 2>&1)
echo "$output"
echo "$output" | grep -q 'PASS: TestNukeConfigFile' || { echo "ERROR: TestNukeConfigFile did not run"; exit 1; }
- name: Integration test (dry-run against us-east-1)
env:
DISABLE_TELEMETRY: "true"
run: |
go run main.go aws \
--dry-run \
--force \
--config ./.github/nuke_config.yml \
--region us-east-1 \
--log-level info
build:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [linux, windows, darwin]
arch: ['386', amd64, arm64]
exclude:
- os: darwin
arch: '386'
- os: windows
arch: arm64
steps:
- uses: actions/checkout@v4
- name: Install mise
uses: jdx/mise-action@v3
with:
version: 2025.12.10
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Go module cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: go mod download
- name: Build binary
run: |
mkdir -p bin
EXT=""
if [ "${{ matrix.os }}" = "windows" ]; then
EXT=".exe"
fi
CGO_ENABLED=0 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} \
go build -ldflags="-X main.VERSION=${{ github.ref_name }}" \
-o bin/cloud-nuke_${{ matrix.os }}_${{ matrix.arch }}${EXT} .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cloud-nuke_${{ matrix.os }}_${{ matrix.arch }}
path: bin/
release:
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.run_release)
needs: build
runs-on: macos-latest
timeout-minutes: 30
permissions:
contents: write
id-token: write
env:
GON_VERSION: v0.0.37
steps:
- name: Validate required secrets
env:
MACOS_AC_LOGIN: ${{ secrets.MACOS_AC_LOGIN }}
MACOS_AC_PASSWORD: ${{ secrets.MACOS_AC_PASSWORD }}
MACOS_AC_PROVIDER: ${{ secrets.MACOS_AC_PROVIDER }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
run: |
missing=()
for var in MACOS_AC_LOGIN MACOS_AC_PASSWORD MACOS_AC_PROVIDER MACOS_CERTIFICATE MACOS_CERTIFICATE_PASSWORD; do
if [ -z "${!var}" ]; then
missing+=("$var")
fi
done
if [ "${#missing[@]}" -gt 0 ]; then
echo "::error::Missing required secrets: ${missing[*]}"
exit 1
fi
echo "All required secrets are set"
- uses: actions/checkout@v4
- name: Install mise
uses: jdx/mise-action@v3
with:
version: 2025.12.10
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: bin/
merge-multiple: true
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::087285199408:role/cloud-nuke-gha
aws-region: us-east-1
- name: Cache gon binary
id: cache-gon
uses: actions/cache@v4
with:
path: /usr/local/bin/gon
key: gon-${{ env.GON_VERSION }}
- name: Install gon
if: steps.cache-gon.outputs.cache-hit != 'true'
run: .github/scripts/release/install-gon.sh "$GON_VERSION"
- name: Verify gon installation
run: gon --version
- name: Sign macOS binaries
env:
AC_USERNAME: ${{ secrets.MACOS_AC_LOGIN }}
AC_PASSWORD: ${{ secrets.MACOS_AC_PASSWORD }}
AC_PROVIDER: ${{ secrets.MACOS_AC_PROVIDER }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
run: .github/scripts/release/sign-macos-binaries.sh bin
- name: Generate SHA256SUMS
run: cd bin && shasum -a 256 * > SHA256SUMS
- name: Upload release assets
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for f in bin/*; do
gh release upload "${{ github.ref_name }}" "$f" --clobber
done
- name: List built artifacts (workflow_dispatch only)
if: github.event_name == 'workflow_dispatch'
run: ls -lh bin/