forked from CodeForPhilly/clean-and-green-philly
-
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
4 additions
and
5 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 |
---|---|---|
|
@@ -23,22 +23,21 @@ jobs: | |
git config user.email "[email protected]" | ||
- name: Check if staging is ahead of main | ||
id: check_diff | ||
id: check_diff # Fix indentation here | ||
run: | | ||
git fetch origin main | ||
git fetch origin staging | ||
if [ $(git rev-list --count main..staging) -gt 0 ]; then | ||
echo "staging is ahead" | ||
echo "::set-output name=staging_ahead::true" | ||
echo "staging_ahead=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "staging is not ahead" | ||
echo "::set-output name=staging_ahead::false" | ||
fi | ||
echo "staging_ahead=false" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Open PR if staging is ahead | ||
if: steps.check_diff.outputs.staging_ahead == 'true' | ||
uses: peter-evans/create-pull-request@v7 | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
base: main | ||
|