Skip to content
This repository was archived by the owner on Jul 15, 2026. It is now read-only.

v2.10.0

v2.10.0 #42

Workflow file for this run

name: "Build CLI and Attach to GitHub Release"
on:
release:
types: [published]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: write
jobs:
build:
name: "Build CLI and Attach to GitHub Release"
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
# Setup Go
- name: "Setup Go"
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: "go.mod"
# Print Go version
- run: go version
# Build and release
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
version: latest
args: release --parallelism 2 --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Get Debian Package Names
id: deb_package
run: |
echo "ARM_PACKAGE=$(find dist/ -name '*arm64.deb' | head -n 1)" >> $GITHUB_ENV
echo "AMD_PACKAGE=$(find dist/ -name '*amd64.deb' | head -n 1)" >> $GITHUB_ENV
# Push the Debian package to Cloudsmith
- name: Push Debian ARM package to Cloudsmith
id: push_arm
uses: cloudsmith-io/action@7af394e0f8add4867bce109385962dafecad1b8d # v0.6.14
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "rosesecurity"
repo: "terramaid"
distro: "any-distro"
release: "any-version"
file: ${{ env.ARM_PACKAGE }}
- name: Push Debian AMD package to Cloudsmith
id: push_amd
uses: cloudsmith-io/action@7af394e0f8add4867bce109385962dafecad1b8d # v0.6.14
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "rosesecurity"
repo: "terramaid"
distro: "any-distro"
release: "any-version"
file: ${{ env.AMD_PACKAGE }}
docker:
name: "Build and Push Docker Image"
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Get version number
id: version
run: |
version=$(echo "${{ github.ref }}" | awk -F"/" '{print $NF}' )
echo "version=$version" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Login to Docker Hub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
platforms: linux/amd64,linux/arm64
push: true
tags: rosesecurity/terramaid:${{ steps.version.outputs.version }}
homebrew:
name: "Bump Homebrew Formula"
runs-on: ubuntu-latest
needs: build
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: mislav/bump-homebrew-formula-action@56a283fa15557e9abaa4bdb63b8212abc68e655c # v3.6
with:
# A PR will be sent to github.com/Homebrew/homebrew-core to update this formula:
formula-name: terramaid
formula-path: Formula/t/terramaid.rb
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}