mirror of
https://github.com/storytold/craft-common-actions.git
synced 2026-11-07 19:23:50 +00:00
Eight apps paste the same 25-line job into ci.yml, nix.yml or release.yml (ten copies): Cargo.lock exists and is up to date, no .cargo/config(.toml) replaces, patches or overrides a source, and every git dependency comes from github.com/storytold. Apps' workflows are meant to only call workflows here. actions/check-git-sources holds the check as a tested script, and git-sources.yml runs it on a credential-less checkout, so an app swaps its job for one `uses:` line and keeps `needs: git-sources`. It reports every problem rather than the first, as GitHub error annotations, and treats unreadable TOML as a failure. On all 18 apps' current Cargo.lock and Cargo config it agrees with the inline copy. Co-authored-by: Kristian Myram <kmy@oresundsbron.com>
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: "Git sources"
|
|
|
|
# Fails unless the app builds only from what its Cargo.lock names, and every git dependency comes
|
|
# from github.com/storytold: Cargo.lock exists and is up to date, and no .cargo/config(.toml)
|
|
# replaces, patches or overrides a source. Callers run it beside their gate, or before a release:
|
|
#
|
|
# git-sources:
|
|
# uses: storytold/craft-common-actions/.github/workflows/git-sources.yml@main
|
|
# release:
|
|
# needs: git-sources
|
|
# uses: storytold/craft-common-actions/.github/workflows/release.yml@main
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
working-directory:
|
|
description: "The Cargo workspace root, relative to the checkout"
|
|
type: string
|
|
required: false
|
|
default: "."
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
git-sources:
|
|
name: Git dependencies come from storytold
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- uses: storytold/craft-common-actions/actions/check-git-sources@main
|
|
with:
|
|
working-directory: ${{ inputs.working-directory }}
|