Skip to content

refactor: replace eval with ShadowRealm for safe expression evaluatio… #19

refactor: replace eval with ShadowRealm for safe expression evaluatio…

refactor: replace eval with ShadowRealm for safe expression evaluatio… #19

name: Recreate Staging Branch
on:
push:
branches:
- main
permissions:
contents: write
jobs:
recreate-staging:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check if staging branch exists
id: check-staging
run: |
if git ls-remote --heads origin staging | grep -q staging; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Recreate staging branch
if: steps.check-staging.outputs.exists == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b staging
git push origin staging