paperclip/.github/workflows/pr.yml

38 lines
990 B
YAML

name: PR
on:
pull_request:
permissions:
actions: read
contents: read
pull-requests: read
jobs:
branch-freshness:
name: branch-freshness
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout pull request head
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Verify head contains the triggering base
shell: bash
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -euo pipefail
[[ "$BASE_SHA" =~ ^[0-9a-f]{40}$ ]]
[[ "$HEAD_SHA" =~ ^[0-9a-f]{40}$ ]]
git merge-base --is-ancestor "$BASE_SHA" "$HEAD_SHA"
ci:
uses: paperclipai/paperclip/.github/workflows/pr-trusted.yml@1da6b37fc56dacf5e7ffbd31da35756a1cba41f8