DEBUG: Test main branch check for release

This commit is contained in:
Zanie
2023-09-15 14:22:34 -05:00
parent 0c030b5bf3
commit 3bc593ad7f

View File

@@ -366,3 +366,21 @@ jobs:
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
tmp:
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4
with:
ref: 0c030b5bf31e425cb6070db7386243eca6dbd8f1
- name: Check main branch
if: 0c030b5bf31e425cb6070db7386243eca6dbd8f1
run: |
# Fetch the main branch since a shallow checkout is used by default
git fetch origin main --unshallow
git branch --contains 0c030b5bf31e425cb6070db7386243eca6dbd8f1
if ! git branch --contains 0c030b5bf31e425cb6070db7386243eca6dbd8f1 | grep -E '(^|\s)main$'; then
echo "The specified sha is not on the main branch" >&2
exit 1
fi