Trigger UI Tests for All Customer Branches #412
This file contains hidden or 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
| name: Trigger UI Tests for All Customer Branches | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| schedule: | |
| - cron: '15 2 * * *' | |
| permissions: | |
| actions: write # Grants permission to trigger workflows | |
| contents: read # Access to repository contents | |
| jobs: | |
| trigger-builds: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Get and Trigger Customer Branch UI Tests | |
| run: | | |
| # Authenticate with GitHub CLI using the token | |
| echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | |
| git fetch --prune origin | |
| BRANCHES=$(git ls-remote --heads origin | awk -F'/' '{print $3"/"$4}' | grep '^customer/') | |
| BRANCHES="$BRANCHES"$'\n'"dtq-dev-9-base" | |
| SKIP_BRANCHES=("customer/sav" "customer/uk" "customer/mendelu-v7" "customer/palo-docker" "customer/palo-docker-rebase" "customer/palo-docker-typo-fix") | |
| for branch in $(echo "$BRANCHES" | sed -e 's/[\[\]"]//g' -e 's/,/\n/g'); do | |
| if [[ " ${SKIP_BRANCHES[@]} " =~ " ${branch} " ]]; then | |
| echo "Skipping branch $branch" | |
| continue | |
| fi | |
| echo "Triggering UI tests for branch: $branch" | |
| gh workflow run playwright-tests.yml --ref $branch | |
| done |