Skip to content

Commit 130b6ea

Browse files
authored
Fixes for update-mlir-aie workflow (#46)
* ensure no duplicate checks/PRs for this workflow. * use devel branch, more verbose PR message * Use standard PR template
1 parent 0a6c11c commit 130b6ea

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/update-mlir-aie.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v4
21+
with:
22+
ref: devel
2123

2224
- name: Set up Python
2325
uses: actions/setup-python@v5
@@ -47,12 +49,19 @@ jobs:
4749
run: |
4850
echo "New version found: ${{ steps.latest_release.outputs.tag_with_v }}. Current version is v${{ steps.current_version.outputs.version }}."
4951
52+
new_branch="update-mlir-aie-to-${{ steps.latest_release.outputs.tag_with_v }}"
53+
54+
# Check if branch already exists
55+
if git ls-remote --exit-code origin "refs/heads/$new_branch"; then
56+
echo "Branch $new_branch already exists. Skipping update."
57+
exit 0
58+
fi
59+
5060
# Configure git
5161
git config --global user.name 'github-actions[bot]'
5262
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
5363
5464
# Create new branch
55-
new_branch="update-mlir-aie-to-${{ steps.latest_release.outputs.tag_with_v }}"
5665
git checkout -b $new_branch
5766
5867
# Update requirements.txt
@@ -66,7 +75,12 @@ jobs:
6675
git push --set-upstream origin $new_branch
6776
6877
# Create Pull Request
69-
gh pr create --base main --head $new_branch --title "Update mlir-aie to ${{ steps.latest_release.outputs.tag_with_v }}" --body "This PR updates the mlir-aie version to the latest release."
78+
sed 's/Describe the intent of your PR here./This PR updates the mlir-aie version from v${{ steps.current_version.outputs.version }} to the latest release, ${{ steps.latest_release.outputs.tag_with_v }}./' .github/PULL_REQUEST_TEMPLATE.md | \
79+
gh pr create \
80+
--base devel \
81+
--head $new_branch \
82+
--title "Update mlir-aie from v${{ steps.current_version.outputs.version }} to ${{ steps.latest_release.outputs.tag_with_v }}" \
83+
--body-file -
7084
7185
- name: No new version found
7286
if: steps.current_version.outputs.version == steps.latest_release.outputs.tag

0 commit comments

Comments
 (0)