Skip to content

Bump next from 15.5.6 to 16.0.0 #1558

Bump next from 15.5.6 to 16.0.0

Bump next from 15.5.6 to 16.0.0 #1558

Workflow file for this run

name: Pull request to approve / validate
on:
pull_request: {}
jobs:
TaskDecider:
name: TaskDecider
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
TO_APPROVE: ${{ steps.autoapproval.outputs.BACKSTOP_APPROVED }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v5
- name: ❓ Auto approve
id: autoapproval
shell: bash
run: |
APPROVE_RUN_NUMBER=`cat ./backstopjs.approve`
echo github [$GITHUB_RUN_NUMBER]
echo approve [$APPROVE_RUN_NUMBER]
echo
if [ "$APPROVE_RUN_NUMBER" = "$GITHUB_RUN_NUMBER" ]; then
echo "BACKSTOP_APPROVED=true" >> $GITHUB_OUTPUT
else
echo "BACKSTOP_APPROVED=false" >> $GITHUB_OUTPUT
fi
Approve:
permissions:
pull-requests: write
contents: read
needs: TaskDecider
if: needs.TaskDecider.outputs.TO_APPROVE == 'true'
uses: ./.github/workflows/e2e-auto-approve.yml
with:
branch: ${{ github.head_ref }}
deployed_url: walcron-git-${{ github.head_ref }}-walcron-coorperations-projects.vercel.app
secrets: inherit
E2E:
permissions:
pull-requests: write
contents: read
needs: TaskDecider
if: needs.TaskDecider.outputs.TO_APPROVE == 'false'
uses: ./.github/workflows/e2e-test.yml
secrets: inherit
with:
deployed_url: walcron-git-${{ github.head_ref }}-walcron-coorperations-projects.vercel.app
PostApprove:
needs: Approve
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: 🔎 Check for new commit.
run: |
echo "Has change: ${{ needs.Approve.outputs.HAVE_APPROVAL }}"
if [ "${{ needs.Approve.outputs.HAVE_APPROVAL }}" = "false" ]; then
echo "One should never reach this line."
echo "backstopjs.approve triggered an approve, but nothing got approved to re-trigger revalidation workflow."
exit 1
fi
shell: bash
build:
needs: E2E
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: ✅ Just to say i am ok
run: |
echo "All good to merge"
shell: bash