-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
push to branch push to branch push to branch push to branch push to branch
- Loading branch information
1 parent
100f039
commit 655deaa
Showing
1 changed file
with
15 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 |
---|---|---|
|
@@ -4,6 +4,8 @@ on: | |
pull_request: | ||
branches: | ||
- master | ||
permissions: | ||
contents: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}-{{ github.event_name }} | ||
|
@@ -19,11 +21,7 @@ jobs: | |
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Check Current Branch | ||
run: | | ||
git checkout ${{ github.head_ref }} | ||
python-version: 3.8 | ||
|
||
- name: Run Bash Script | ||
run: | | ||
|
@@ -38,12 +36,22 @@ jobs: | |
rm -rf $OLD_SCHEMAS_DIR | ||
rm -rf repo_master_copy | ||
- name: Commit and Push Changes | ||
- name: Commit changes | ||
id: commit_changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add changelog/source_data.md | ||
if git commit -m "Update changelog for Source data"; then | ||
echo "Changes committed." | ||
git push origin ${{ github.head_ref }} | ||
echo "changes_committed=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "No changes to commit." | ||
echo "changes_committed=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Push branch | ||
if: steps.commit_changes.outputs.changes_committed == 'true' | ||
run: | | ||
git push | ||