mirror of
https://github.com/kubereboot/kured.git
synced 2026-04-22 09:36:54 +00:00
81 lines
2.8 KiB
YAML
81 lines
2.8 KiB
YAML
name: Daily jobs
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "30 1 * * *"
|
|
|
|
jobs:
|
|
periodics-gotest:
|
|
name: Run go tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
- name: run tests
|
|
run: go test -json ./... > test.json
|
|
- name: Annotate tests
|
|
if: always()
|
|
uses: guyarb/golang-test-annoations@v0.7.0
|
|
with:
|
|
test-results: test.json
|
|
|
|
periodics-mark-stale:
|
|
name: Mark stale issues and PRs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Stale by default waits for 60 days before marking PR/issues as stale, and closes them after 21 days.
|
|
# Do not expire the first issues that would allow the community to grow.
|
|
- uses: actions/stale@v8
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
stale-issue-message: 'This issue was automatically considered stale due to lack of activity. Please update it and/or join our slack channels to promote it, before it automatically closes (in 7 days).'
|
|
stale-pr-message: 'This PR was automatically considered stale due to lack of activity. Please refresh it and/or join our slack channels to highlight it, before it automatically closes (in 7 days).'
|
|
stale-issue-label: 'no-issue-activity'
|
|
stale-pr-label: 'no-pr-activity'
|
|
exempt-issue-labels: 'good first issue,keep'
|
|
days-before-close: 21
|
|
|
|
check-docs-links:
|
|
name: Check docs for incorrect links
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Link Checker
|
|
uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
with:
|
|
args: --verbose --no-progress '*.md' '*.yaml' '*/*/*.go' --exclude-link-local
|
|
fail: true
|
|
|
|
vuln-scan:
|
|
name: Build image and scan it against known vulnerabilities
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Ensure go version
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
check-latest: true
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Setup GoReleaser
|
|
run: make bootstrap-tools
|
|
- name: Find current tag version
|
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
id: tags
|
|
- name: Build artifacts
|
|
run: VERSION="${{ steps.tags.outputs.sha_short }}" make image
|
|
- name: Run Trivy vulnerability scanner
|
|
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f
|
|
with:
|
|
image-ref: 'ghcr.io/${{ github.repository }}:${{ steps.tags.outputs.sha_short }}'
|
|
format: 'table'
|
|
exit-code: '1'
|
|
ignore-unfixed: true
|
|
vuln-type: 'os,library'
|
|
severity: 'CRITICAL,HIGH'
|