-
Notifications
You must be signed in to change notification settings - Fork 13
42 lines (38 loc) · 1.36 KB
/
on-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: On PR
on:
workflow_dispatch:
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
secrets: inherit
spdx:
uses: ./.github/workflows/spdx.yml
secrets: inherit
build-and-test:
uses: ./.github/workflows/build-and-test.yml
secrets: inherit
# When a PR runs on the uplift branch trigger the downstream checks
downstream-checks:
runs-on: ubuntu-latest
needs: build-and-test
if: github.event.pull_request.head.ref == 'uplift'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
TARGET_REPO: tenstorrent/tt-forge-fe
WORKFLOW_NAME: build-and-test.yml
steps:
- name: Trigger ${{ env.TARGET_REPO }}
shell: bash
run: |
gh workflow run ${{ env.WORKFLOW_NAME }} \
--repo ${{ env.TARGET_REPO }} --ref main \
--field test_mark=push \
--field mlir_override=${{ github.event.pull_request.head.sha }}
gh run list --workflow=${{ env.WORKFLOW_NAME }} --repo ${{ env.TARGET_REPO }} --limit 1
echo "Triggered ${{ env.TARGET_REPO }}"
echo "### Triggered [${{ env.TARGET_REPO }}](https://github.com/${{ env.TARGET_REPO }}/actions/workflows/${{ env.WORKFLOW_NAME }}) :rocket:" >> $GITHUB_STEP_SUMMARY