forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.1 KB
/
Copy pathrelease-eligibility.yml
File metadata and controls
40 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Release Eligibility
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
release-eligibility:
name: Release Eligibility
runs-on: ubuntu-latest
steps:
- name: Checkout exact SHA
uses: actions/checkout@v7
with:
ref: ${{ github.sha }}
fetch-depth: 0
- name: Resolve deterministic-check range
id: range
run: |
set -euo pipefail
if [[ "${{ github.event_name }}" == "push" ]]; then
echo "before=${{ github.event.before }}" >> "$GITHUB_OUTPUT"
echo "after=${{ github.event.after }}" >> "$GITHUB_OUTPUT"
else
echo "before=$(git rev-parse --verify HEAD^)" >> "$GITHUB_OUTPUT"
echo "after=$(git rev-parse --verify HEAD)" >> "$GITHUB_OUTPUT"
fi
- name: Verify release eligibility
uses: ./.github/actions/release-eligibility
with:
ref: ${{ github.ref }}
sha: ${{ github.sha }}
before: ${{ steps.range.outputs.before }}
after: ${{ steps.range.outputs.after }}