Skip to content

v0.15.0

v0.15.0 #48

Workflow file for this run

name: Release
# This Github Action workflow is triggered, when a new release is created.
on:
release:
types: [created]
permissions:
contents: write
packages: write
jobs:
scan_sourcecode:
name: Scanning sourcecode to find vulberabilities, misconfigurations and exposed secrets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Create outputs directory
run: mkdir -p /tmp/trivy
- name: Run Trivy security scan against the sourcecode
uses: aquasecurity/[email protected]
with:
scan-type: fs
vuln-type: library
scan-ref: .
trivy-config: trivy.yaml
format: table
output: security-scan-result.txt
- name: Append the security scan result to the job summary
run: |
{
echo "### 🛡️ Sourcecode security scan result :"
echo ""
echo '```terraform'
cat security-scan-result.txt
echo '```'
} >> $GITHUB_STEP_SUMMARY
build_and_push_kubeaid_core_container_images:
name: Build and push KubeAid Core container images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: obmondo
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push KubeAid Core AMD64 and ARM64 container images
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
# NOTE : It takes pretty long to build container images for the ARM64 platform (even when
# using QEMU).
platforms: linux/amd64,linux/arm64
tags: ghcr.io/obmondo/kubeaid-core:${{ github.event.release.tag_name }}
push: true
# Experimental cache exporter for GitHub Actions provided by buildx and BuildKit.
# It uses the GitHub Cache API to fetch and load the Docker layer cache blobs across
# builds.
cache-from: type=gha
cache-to: type=gha,mode=max
build_and_publish_kubeaid_cli_binaries:
name: Build and publish KubeAid CLI binaries
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: wangyoucao577/go-release-action@v1
with:
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: ./cmd/kubeaid-cli
binary_name: kubeaid-cli
github_token: ${{ secrets.GITHUB_TOKEN }}
compress_assets: OFF
ldflags: -s -w