Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ updates:
gha:
patterns:
- "*"
cooldown:
default-days: 7
- package-ecosystem: gomod
directory: /
schedule:
Expand All @@ -33,6 +35,8 @@ updates:
gomod:
patterns:
- "*"
cooldown:
default-days: 7
- package-ecosystem: docker
directory: /
schedule:
Expand All @@ -47,3 +51,5 @@ updates:
docker:
patterns:
- "*"
cooldown:
default-days: 7
30 changes: 30 additions & 0 deletions .github/workflows/lint_gha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Linting - GitHub Actions
permissions: {}
on:
push:
branches: [master]
paths:
- ".github/workflows/*.yml"
- ".github/dependabot.yml"
pull_request:
branches: [master]
paths:
- ".github/workflows/*.yml"
- ".github/dependabot.yml"

jobs:
lint-gha:
name: Lint GitHub Actions
timeout-minutes: 5
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run zizmor
uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4
7 changes: 5 additions & 2 deletions .github/workflows/lint_go.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: Linting - Go
permissions: {}
# Split until path filtering for jobs added
# https://github.community/t/path-filtering-for-jobs-and-steps/16447
on:
Expand All @@ -22,7 +23,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false

- name: Run golangci-lint
uses: reviewdog/action-golangci-lint@v2
uses: reviewdog/action-golangci-lint@c76cceaaab89abe74e649d2e34c6c9adc26662d2 # v2.10.0
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: Release
permissions: {}
on:
# https://github.com/actions/runner/issues/1007
push:
Expand All @@ -10,17 +11,22 @@ jobs:
release:
name: Release on GitHub
runs-on: ubuntu-latest
permissions:
contents: write # Required for GoReleaser to create releases and upload assets.
steps:
- name: Check out code
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
cache: false

- name: Launch goreleaser
uses: goreleaser/goreleaser-action@v6.4.0
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
args: release
env:
Expand Down
25 changes: 9 additions & 16 deletions .github/workflows/release_containers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: Release Containers
permissions: {}
on:
# https://github.com/actions/runner/issues/1007
push:
Expand All @@ -21,20 +22,14 @@ jobs:
suffix: -alpine

steps:
- name: Cache container layers
uses: actions/cache@v4.3.0
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}${{ matrix.containers.suffix }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}${{ matrix.containers.suffix }}-buildx-

- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false

- name: Generate container tags and labels
id: docker_meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: controlplane/badrobot
tags: |
Expand All @@ -47,7 +42,7 @@ jobs:
org.opencontainers.image.vendor=controlplane

- name: Login to Docker Hub Registry
uses: docker/login-action@v3.6.0
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -61,20 +56,18 @@ jobs:
# password: ${{ secrets.CR_PAT }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0

- name: Build container and push tags
uses: docker/build-push-action@v6
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
file: ${{ matrix.containers.file }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: mode=max,type=local,dest=/tmp/.buildx-cache
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/security_analysis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Security Analysis

permissions: {}
on:
push:
branches: [master]
Expand All @@ -27,16 +27,18 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@3ea06614dafe36dec890db3446326e0d40ce53d4 # v3.38.1
with:
languages: go

# analyzes + uploads sarif
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@3ea06614dafe36dec890db3446326e0d40ce53d4 # v3.38.1

govulncheck:
name: govulncheck
Expand All @@ -46,10 +48,12 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false

- name: Vulnerability Scan Go Code
uses: golang/govulncheck-action@v1
uses: golang/govulncheck-action@032d45514ae346b1db93c04b0c90b841c370344f # v1.1.0
with:
go-version-file: go.mod
repo-checkout: false
Expand All @@ -65,7 +69,7 @@ jobs:
cat <<< $(jq '(.runs[] | select(.results == null) | .results) |= []' govulncheck.sarif) > govulncheck.sarif

- name: Upload Scan SARIF file
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@3ea06614dafe36dec890db3446326e0d40ce53d4 # v3.38.1
with:
sarif_file: govulncheck.sarif
category: govulncheck
6 changes: 4 additions & 2 deletions .github/workflows/test_acceptance.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: Testing - Acceptance
permissions: {}
# Split until path filtering for jobs added
# https://github.community/t/path-filtering-for-jobs-and-steps/16447
on:
Expand All @@ -26,13 +27,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false
# needed for bats tests
submodules: true

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
id: go
with:
go-version-file: go.mod
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test_unit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: Testing - Unit
permissions: {}
# Split until path filtering for jobs added
# https://github.community/t/path-filtering-for-jobs-and-steps/16447
on:
Expand All @@ -22,10 +23,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod

Expand Down
Loading