Skip to content

fix: remove binary signing ( temp ) #11

fix: remove binary signing ( temp )

fix: remove binary signing ( temp ) #11

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
env:
IMAGE_NAME: hatamiarash7/netflow-exporter
permissions:
contents: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
jobs:
init:
name: 🚩 Initialize
runs-on: ubuntu-latest
steps:
- name: Cancel previous workflow
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
binary:
name: Build binary
needs: init
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
docker:
name: 🐳 Build Docker image
needs: init
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Get version
run: echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Get Current Date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: hatamiarash7
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7
build-args: |
APP_VERSION=${{ env.APP_VERSION }}
DATE_CREATED=${{ steps.date.outputs.date }}
tags: |
${{ env.IMAGE_NAME }}:${{ env.APP_VERSION }}
${{ env.IMAGE_NAME }}:latest
- name: Run Trivy scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.IMAGE_NAME }}:latest
exit-code: "0"
ignore-unfixed: true
vuln-type: "os,library"
severity: "CRITICAL,HIGH"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
- name: Upload Trivy scan results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"