-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
13 additions
and
7 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 |
---|---|---|
|
@@ -55,8 +55,6 @@ jobs: | |
|
||
- name: Check for repository changes and commit | ||
id: check_changes | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
|
@@ -93,18 +91,26 @@ jobs: | |
echo "TZDATA_VERSION=$TZDATA_VERSION" >> $GITHUB_ENV | ||
echo "TZDATA_NEWS=$TZDATA_NEWS" >> $GITHUB_ENV | ||
- name: Check for repository changes and commit | ||
id: commit_changes | ||
if: steps.check_changes.outputs.changes_detected == 'true' | ||
run: | | ||
git commit -m "Update tzdata to version $TZDATA_VERSION" | ||
echo "::set-output name=changes_detected::true" | ||
- name: Create PR | ||
id: commit_changes | ||
if: steps.check_changes.outputs.changes_detected == 'true' | ||
run: | | ||
git commit -m "Update tzdata to version $TZDATA_VERSION" \ | ||
-m "$TZDATA_NEWS" | ||
echo "::set-output name=changes_detected::true" | ||
create-pr: | ||
runs-on: ubuntu-latest | ||
needs: check-for-updates | ||
if: needs.check-for-updates.outputs.changes_detected == 'true' # Run only if changes are detected | ||
steps: | ||
- name: Create pull request | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: steps.check_changes.outputs.changes_detected == 'true' | ||
run: | | ||
gh pr create --title "Update tzdata to version $TZDATA_VERSION" \ | ||
--body "$TZDATA_NEWS" \ | ||
|