[project-base] [SSP-2146] cypress tests extra scenarios #301
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
types: | |
- closed | |
name: Clean up after branch merge | |
jobs: | |
variables: | |
runs-on: ubuntu-22.04 | |
outputs: | |
BRANCH_NAME: ${{ steps.variables.outputs.BRANCH_NAME }} | |
steps: | |
- name: Extract variables to output | |
id: variables | |
run: | | |
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | |
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT | |
cancel-review-after-branch-merge: | |
name: Cancel review after branch merge | |
runs-on: [self-hosted, linux, review-stage] | |
needs: variables | |
steps: | |
- name: GIT checkout branch - ${{ github.event.repository.default_branch }} | |
uses: actions/checkout@v4 | |
with: | |
ref: 'refs/heads/${{ github.event.repository.default_branch }}' | |
path: cancel-review-after-branch-merge | |
- name: Cancel review | |
working-directory: cancel-review-after-branch-merge | |
run: | | |
/bin/bash ./.github/cancel-review.sh ${{ needs.variables.outputs.BRANCH_NAME }} | |
remove-branch-from-split-repositories: | |
name: Remove branch from split repositories | |
needs: variables | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: GIT checkout branch - ${{ github.event.repository.default_branch }} | |
uses: actions/checkout@v4 | |
with: | |
ref: 'refs/heads/${{ github.event.repository.default_branch }}' | |
- name: Prepare variables for removing split branches from packages | |
run: | | |
echo "REMOTE_TEMPLATE=https://${{ secrets.ACTIONS_GIT_PUSH_TOKEN }}@github.com/shopsys/" >> $GITHUB_ENV | |
- name: Remove split branches from packages | |
run: | | |
git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all | |
bash ./.github/monorepo/remove_branch.sh "${{ needs.variables.outputs.BRANCH_NAME }}" "${REMOTE_TEMPLATE}" |