Skip to content

Merge pull request #81 from BloodHoundAD/BED-4599-configurable-collec… #29

Merge pull request #81 from BloodHoundAD/BED-4599-configurable-collec…

Merge pull request #81 from BloodHoundAD/BED-4599-configurable-collec… #29

Workflow file for this run

name: Publish
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
os:
- darwin
- linux
- windows
arch:
- amd64
- arm64
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
check-latest: true
cache: true
- name: Build
run: 'go build -ldflags="-s -w -X github.com/bloodhoundad/azurehound/v2/constants.Version=${{ github.ref_name }}"'
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
- name: Zip
run: 7z a -tzip -mx9 azurehound-${{ matrix.os }}-${{ matrix.arch }}.zip azurehound*
- name: Compute Checksum
run: sha256sum azurehound-${{ matrix.os }}-${{ matrix.arch }}.zip > azurehound-${{ matrix.os }}-${{ matrix.arch }}.zip.sha256
- name: Upload Release
uses: softprops/action-gh-release@v1
with:
files: |
azurehound-${{ matrix.os }}-${{ matrix.arch }}.zip
azurehound-${{ matrix.os }}-${{ matrix.arch }}.zip.sha256
containerize:
runs-on: ubuntu-latest
permissions:
packages: write
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ghcr.io/bloodhoundad/azurehound
tags: |
type=semver,pattern={{version}},prefix=v
type=semver,pattern={{major}}.{{minor}},prefix=v
- name: Build Container Image
uses: docker/build-push-action@v3
with:
context: .
build-args: VERSION=${{ github.ref_name }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true