Try using an existing GHA with the same implementation #2
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: CI Pipeline | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| determine-runner: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| runner: ${{ steps.runner-selector.outputs.use-runner }} | |
| steps: | |
| - name: Select self-hosted runner with fallback | |
| id: runner-selector | |
| uses: mendesbarreto/runner-selector-action@v1 | |
| with: | |
| primary-runner: "linux-arm64" | |
| fallback-runner: "thevickypedia-default" | |
| github-token: ${{ secrets.GIT_TOKEN }} | |
| check-org-runners: true | |
| build-and-test: | |
| needs: determine-runner | |
| runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} | |
| steps: | |
| - name: Print selected runner | |
| run: echo "This job is running on ${{ needs.determine-runner.outputs.runner }}" | |
| - name: Checkout code | |
| uses: actions/checkout@v4 |