Files
meshcore-exporter/.gitea/workflows/pr-check.yml
T
renovate-bot e896244524
pr-check / dependencies (pull_request) Successful in 6s
pr-check / build (pull_request) Successful in 30s
ci / test (push) Successful in 1m49s
ci / test (pull_request) Successful in 1m53s
Update https://git.rfa.cz/tth-pub/ci-actions action to v15
2026-11-11 22:58:18 +00:00

62 lines
1.9 KiB
YAML

# PR check (Renovate and any other PR): the image must build like in
# image.yml, just without a push, and the tree's dependencies are scanned
# (report only). Renovate automerges only after this and ci.yml are green;
# the image after the merge is still guarded by the Trivy gate.
name: pr-check
"on":
pull_request:
# A newer push to the PR branch (Renovate rebases often) cancels the older run.
concurrency:
group: pr-check-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v4
# Read-only use of image.yml's layer cache: a PR never writes it.
- name: Registry login (cache import)
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
[ -z "$REGISTRY_TOKEN" ] ||
echo "$REGISTRY_TOKEN" | docker login git.rfa.cz -u "${{ gitea.actor }}" --password-stdin
- name: Build date
id: date
run: echo "day=$(date -u +%F)" >> "$GITHUB_OUTPUT"
- name: Build (no push)
uses: docker/build-push-action@v7
with:
context: .
push: false
load: true
pull: true
provenance: false
platforms: linux/amd64
build-args: OS_UPDATES=${{ steps.date.outputs.day }}
tags: meshcore-exporter:pr
cache-from: type=registry,ref=git.rfa.cz/tth-pub/meshcore-exporter:buildcache-amd64
- name: Smoke test (--help, --version)
run: |
set -euo pipefail
docker run --rm meshcore-exporter:pr --version
docker run --rm meshcore-exporter:pr --help | grep -q -- --repeaters
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Dependencies in the tree
uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v15
with:
scan-type: fs
mode: warn