mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-19 22:17:28 +02:00
Bumps the github-actions group with 7 updates: | Package | From | To | | --- | --- | --- | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.38.2` | `4.38.3` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.38.2` | `4.38.3` | | [cachix/install-nix-action](https://github.com/cachix/install-nix-action) | `31.11.1` | `31.11.2` | | [anomalyco/opencode/github](https://github.com/anomalyco/opencode) | `2.0.24` | `2.0.29` | | [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) | `e2a55d2ffb04f378e9626c28d38b36d230d1e12f` | `683b588c487a69d01f6c6ddf40f036ff682cc2c8` | | [google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml](https://github.com/google/osv-scanner-action) | `2.6.0` | `2.7.0` | | [google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml](https://github.com/google/osv-scanner-action) | `2.6.0` | `2.7.0` | Updates `github/codeql-action/init` from 4.38.2 to 4.38.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2...24c54180a607b1449ed407dd24f251e4e9147c8d) Updates `github/codeql-action/analyze` from 4.38.2 to 4.38.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2...24c54180a607b1449ed407dd24f251e4e9147c8d) Updates `cachix/install-nix-action` from 31.11.1 to 31.11.2 - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md) - [Commits](https://github.com/cachix/install-nix-action/compare/13d8dd58da0234aa297dedd986986ccb8e7f3e24...448cde739abec1eaf0646249e3d25bb8d9bc7702) Updates `anomalyco/opencode/github` from 2.0.24 to 2.0.29 - [Release notes](https://github.com/anomalyco/opencode/releases) - [Changelog](https://github.com/anomalyco/opencode/blob/dev/CHANGELOG.md) - [Commits](https://github.com/anomalyco/opencode/compare/e7a34f09bfd9134dfade5a8ddb843f7030bc9a69...042d0832f5f3a73eaa039a58a7d565776f6d4290) Updates `dtolnay/rust-toolchain` from e2a55d2ffb04f378e9626c28d38b36d230d1e12f to 683b588c487a69d01f6c6ddf40f036ff682cc2c8 - [Release notes](https://github.com/dtolnay/rust-toolchain/releases) - [Commits](https://github.com/dtolnay/rust-toolchain/compare/e2a55d2ffb04f378e9626c28d38b36d230d1e12f...683b588c487a69d01f6c6ddf40f036ff682cc2c8) Updates `google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml` from 2.6.0 to 2.7.0 - [Release notes](https://github.com/google/osv-scanner-action/releases) - [Commits](https://github.com/google/osv-scanner-action/compare/a345acffa64b0eaede81a3d9aae6141214d9c8fc...b1d267aea5211fa648d9d442fa64b90dbdcbdd36) Updates `google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml` from 2.6.0 to 2.7.0 - [Release notes](https://github.com/google/osv-scanner-action/releases) - [Commits](https://github.com/google/osv-scanner-action/compare/a345acffa64b0eaede81a3d9aae6141214d9c8fc...b1d267aea5211fa648d9d442fa64b90dbdcbdd36) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.38.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/analyze dependency-version: 4.38.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: cachix/install-nix-action dependency-version: 31.11.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: anomalyco/opencode/github dependency-version: 2.0.29 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: dtolnay/rust-toolchain dependency-version: 683b588c487a69d01f6c6ddf40f036ff682cc2c8 dependency-type: direct:production dependency-group: github-actions - dependency-name: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml dependency-version: 2.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml dependency-version: 2.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
160 lines
5.4 KiB
YAML
160 lines
5.4 KiB
YAML
name: Pull Request Checks
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ["main"]
|
|
merge_group:
|
|
branches: ["main"]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# A new push to a pull request makes the previous run's results moot.
|
|
concurrency:
|
|
group: pr-checks-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# Decides which suites this pull request can affect. Anything unrecognised
|
|
# runs everything, so a new directory is covered until it is listed here.
|
|
changes:
|
|
name: Detect changed areas
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
outputs:
|
|
js: ${{ steps.filter.outputs.js }}
|
|
rust: ${{ steps.filter.outputs.rust }}
|
|
deps: ${{ steps.filter.outputs.deps }}
|
|
steps:
|
|
- name: Checkout repository code
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
# The merge commit and its first parent, the base branch tip.
|
|
fetch-depth: 2
|
|
|
|
- name: Classify changed files
|
|
id: filter
|
|
env:
|
|
EVENT_NAME: ${{ github.event_name }}
|
|
run: |
|
|
all() {
|
|
{
|
|
echo "js=true"
|
|
echo "rust=true"
|
|
echo "deps=true"
|
|
} >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
}
|
|
[ "$EVENT_NAME" = "pull_request" ] || all
|
|
git diff --name-only HEAD^1 HEAD > /tmp/changed.txt || all
|
|
[ -s /tmp/changed.txt ] || all
|
|
|
|
js=false; rust=false; deps=false
|
|
while IFS= read -r file; do
|
|
case "$file" in
|
|
# Text and tooling the lint and test jobs never read.
|
|
*.md|LICENSE|.github/ISSUE_TEMPLATE/*|\
|
|
.github/prompts/*|.github/dependabot.yml|.github/codeql/*|.github/actionlint.yaml|\
|
|
.github/scripts/*|.github/actions/*|_typos.toml|assets/*|flake.nix|flake.lock|\
|
|
packaging/*|snap/*|sdk/*|.vscode/*|.envrc|osv-scanner.toml)
|
|
;;
|
|
# Workflows that are not part of this check.
|
|
.github/workflows/*)
|
|
case "$file" in
|
|
.github/workflows/pr-checks.yml|.github/workflows/lint-js.yml|.github/workflows/lint-rs.yml)
|
|
js=true; rust=true ;;
|
|
esac
|
|
;;
|
|
# Rust only. The .mjs helpers under src-tauri are linted by biome.
|
|
src-tauri/*.mjs)
|
|
js=true; rust=true ;;
|
|
src-tauri/*)
|
|
rust=true ;;
|
|
*)
|
|
js=true; rust=true ;;
|
|
esac
|
|
case "$file" in
|
|
package.json|pnpm-lock.yaml|pnpm-workspace.yaml|donut-sync/package.json|\
|
|
src-tauri/Cargo.toml|src-tauri/Cargo.lock|osv-scanner.toml|.github/workflows/pr-checks.yml)
|
|
deps=true ;;
|
|
esac
|
|
done < /tmp/changed.txt
|
|
|
|
{
|
|
echo "js=$js"
|
|
echo "rust=$rust"
|
|
echo "deps=$deps"
|
|
} >> "$GITHUB_OUTPUT"
|
|
echo "Changed files: $(wc -l < /tmp/changed.txt); js=$js rust=$rust deps=$deps"
|
|
|
|
lint-js:
|
|
name: Lint JavaScript/TypeScript
|
|
needs: changes
|
|
if: needs.changes.outputs.js == 'true'
|
|
uses: ./.github/workflows/lint-js.yml
|
|
permissions:
|
|
contents: read
|
|
|
|
lint-rust:
|
|
name: Lint Rust
|
|
needs: changes
|
|
if: needs.changes.outputs.rust == 'true'
|
|
uses: ./.github/workflows/lint-rs.yml
|
|
permissions:
|
|
contents: read
|
|
|
|
# Reports only vulnerabilities a pull request introduces, so it has nothing
|
|
# to say unless a manifest or lockfile changed. osv.yml no longer runs this
|
|
# scan a second time for the same pull request.
|
|
security-scan:
|
|
name: Security Vulnerability Scan
|
|
needs: changes
|
|
if: needs.changes.outputs.deps == 'true'
|
|
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@b1d267aea5211fa648d9d442fa64b90dbdcbdd36" # v2.7.0
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
actions: read
|
|
with:
|
|
scan-args: |-
|
|
-r
|
|
--config=osv-scanner.toml
|
|
--lockfile=pnpm-lock.yaml
|
|
--lockfile=src-tauri/Cargo.lock
|
|
./
|
|
|
|
# E2E suites deliberately do not run here. They need real credentials, Docker,
|
|
# and a desktop session, which CI could not supply reliably. They are run
|
|
# locally instead; see the E2E section of AGENTS.md.
|
|
|
|
pr-status:
|
|
name: PR Status Check
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
needs: [changes, lint-js, lint-rust, security-scan]
|
|
if: always()
|
|
steps:
|
|
- name: Check all jobs succeeded
|
|
env:
|
|
CHANGES: ${{ needs.changes.result }}
|
|
LINT_JS: ${{ needs.lint-js.result }}
|
|
LINT_RUST: ${{ needs.lint-rust.result }}
|
|
SECURITY_SCAN: ${{ needs.security-scan.result }}
|
|
run: |
|
|
# `skipped` means the pull request cannot affect that suite.
|
|
failed=0
|
|
[ "$CHANGES" = "success" ] || { echo "Change detection: $CHANGES"; failed=1; }
|
|
for pair in "lint-js=$LINT_JS" "lint-rust=$LINT_RUST" "security-scan=$SECURITY_SCAN"; do
|
|
case "${pair#*=}" in
|
|
success|skipped) echo "${pair%%=*}: ${pair#*=}" ;;
|
|
*) echo "${pair%%=*}: ${pair#*=}"; failed=1 ;;
|
|
esac
|
|
done
|
|
if [ "$failed" -ne 0 ]; then
|
|
echo "One or more checks failed"
|
|
exit 1
|
|
fi
|
|
echo "All checks passed!"
|