Nightly Coraza Check #460
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly Coraza Check | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/nightly-coraza-check.yaml" | |
- ".github/workflows/ci.yaml" | |
schedule: | |
- cron: "0 4 * * *" | |
env: | |
GO_VERSION: '1.22' | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Install Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: true | |
- name: Get last commit of coraza | |
id: coraza-latest-commit | |
run: echo "value=$(gh api repos/corazawaf/coraza/commits/main -q .sha)" >> $GITHUB_OUTPUT | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch last coraza version | |
run: go get -u github.com/corazawaf/coraza/v3@${{ steps.coraza-latest-commit.outputs.value }} && go mod tidy | |
- name: Run unit tests | |
run: go run mage.go test | |
- name: Build site | |
run: go run mage.go build |