diff --git a/.forgejo/workflows/validate.yml b/.forgejo/workflows/validate.yml index d73ceef..e01288d 100644 --- a/.forgejo/workflows/validate.yml +++ b/.forgejo/workflows/validate.yml @@ -5,17 +5,23 @@ on: pull_request: branches: [main] +# The repository uses the sha256 git object format. Git < 2.42 cannot speak +# the sha256 wire protocol, so we must run the job in a container whose Debian +# base has a recent-enough git (bookworm ships 2.39, trixie ships 2.47+). jobs: json-schema: name: JSON Schema (ajv) runs-on: ubuntu-latest + container: + image: node:24-trixie-slim steps: - - name: Install prerequisites in container + - name: Install git + curl in container run: | set -euo pipefail - command -v curl >/dev/null || { apt-get update && apt-get install -y curl ca-certificates; } + apt-get update + apt-get install -y --no-install-recommends git curl ca-certificates + git --version node --version - npm --version - name: Checkout uses: actions/checkout@v4 @@ -61,11 +67,15 @@ jobs: rego: name: Rego (opa fmt + opa test) runs-on: ubuntu-latest + container: + image: debian:trixie-slim steps: - - name: Install prerequisites in container + - name: Install git + curl in container run: | set -euo pipefail - command -v curl >/dev/null || { apt-get update && apt-get install -y curl ca-certificates; } + apt-get update + apt-get install -y --no-install-recommends git curl ca-certificates + git --version - name: Checkout uses: actions/checkout@v4