diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index cf305f4637510..39804db0d3a46 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -58,6 +58,20 @@ jobs: repository: "ROCm/TheRock" ref: "compiler/amd-mainline" fetch-depth: 10 + - name: Update child workflows + run: | + # Define the regex pattern and replacement + REGEX_PATTERN='repository: "ROCm/TheRock"' + REPLACEMENT='repository: "ROCm/TheRock"\n ref: compiler/amd-mainline' + + # Directory containing child workflows + WORKFLOW_DIR=".github/workflows" + + # Loop through child YAML files and apply the regex replacement + for file in "$WORKFLOW_DIR"/*.yml; do + echo "Updating $file..." + sed -i "s|$REGEX_PATTERN|$REPLACEMENT|g" "$file" + done - name: SHA of TheRock run: | git rev-parse HEAD @@ -68,7 +82,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} PR_NUMBER: ${{ github.event.number }} run: | - echo "PR_LABELS=$(gh pr view ${PR_NUMBER} --json labels)" >> $GITHUB_ENV + echo "PR_LABELS=$(gh pr view ${PR_NUMBER} --repo ROCm/llvm-project --json labels)" >> $GITHUB_ENV - name: Configuring CI options id: configure diff --git a/.github/workflows/test_artifacts.yml b/.github/workflows/test_artifacts.yml index 6bac4f4766612..fda6355cb0d5c 100644 --- a/.github/workflows/test_artifacts.yml +++ b/.github/workflows/test_artifacts.yml @@ -60,6 +60,7 @@ jobs: uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: repository: "ROCm/TheRock" + ref: "compiler/amd-mainline" sparse-checkout: build_tools path: "prejob" @@ -74,6 +75,7 @@ jobs: uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: repository: "ROCm/TheRock" + ref: "compiler/amd-mainline" - name: Setting up Python uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0