mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 17:50:12 +00:00
ci: require agentcompat stress validation
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
name: Secure resolved ref
|
||||
on:
|
||||
pull_request:
|
||||
concurrency: resolved-${{ github.ref }}
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- id: resolve-agent
|
||||
name: Resolve Agent commit
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
remote='https://github.com/nezhahq/agent.git'
|
||||
mapfile -t refs < <(git ls-remote "$remote" refs/heads/main)
|
||||
(( ${#refs[@]} == 1 ))
|
||||
sha=${refs[0]%%$'\t'*}
|
||||
[[ "$sha" =~ ^[0-9a-f]{40}$ ]]
|
||||
printf 'sha=%s\n' "$sha" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
|
||||
with:
|
||||
repository: nezhahq/agent
|
||||
ref: ${{ steps.resolve-agent.outputs.sha }}
|
||||
persist-credentials: false
|
||||
Reference in New Issue
Block a user