forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ name: Monitor Homebrew Formula | |
|
||
on: workflow_dispatch | ||
|
||
env: | ||
file_changed: false | ||
|
||
jobs: | ||
check-and-update: | ||
runs-on: ubuntu-latest | ||
|
@@ -24,7 +27,9 @@ jobs: | |
fi | ||
- name: Create a new branch if file has changed | ||
if: env.file_changed == 'true' | ||
env: | ||
file_changed: ${{ steps.compare.outputs.file_changed }} | ||
if: $file_changed == 'true' | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Your Name" | ||
|
@@ -33,13 +38,4 @@ jobs: | |
git add chapel-main.rb | ||
git commit -m "Update chapel-main.rb with changes from chapel.rb" | ||
git push --set-upstream origin update-chapel-main | ||
- name: Create a pull request | ||
if: env.file_changed == 'true' | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: update-chapel-main | ||
title: 'Update chapel-main.rb' | ||
body: 'This pull request updates chapel-main.rb with the latest changes from chapel.rb.' | ||
labels: 'auto-update' | ||
echo "Homebrew has updated the formula!" |