Skip to content

Commit

Permalink
Fix issues around commit/pull for bots
Browse files Browse the repository at this point in the history
  • Loading branch information
miozune committed Mar 4, 2024
1 parent a76d514 commit 1269978
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/publish-nightly-lang-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Get current date
id: date
shell: bash
Expand Down Expand Up @@ -72,8 +74,10 @@ jobs:
cd ..
- name: Push commits and tag
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config pull.rebase true
git pull
git pull origin master
git push -d origin ${{ inputs.target_lang }}-latest || :
gh release delete ${{ inputs.target_lang }}-latest || :
git tag ${{ inputs.target_lang }}-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/save-nightly-modpack-history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Ensure Dependencies
uses: ./.github/actions/ensure-dependencies

Expand Down Expand Up @@ -52,6 +54,8 @@ jobs:
TARGET_LANG: "en_US"
- name: Push commit
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config pull.rebase true
git pull
git pull origin master
git push origin master
1 change: 1 addition & 0 deletions src/gtnh_translation_compare/cmd/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ def git_commit(
git_root,
message=message,
author=author,
committer=author,
)


Expand Down
2 changes: 1 addition & 1 deletion src/gtnh_translation_compare/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
PARATRANZ_PROJECT_ID = int(must_get_env("PARATRANZ_PROJECT_ID"))
PARATRANZ_TOKEN = must_get_env("PARATRANZ_TOKEN")

GIT_AUTHOR = os.environ.get("GIT_AUTHOR", None)
GIT_AUTHOR = os.environ.get("GIT_AUTHOR", "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>")

PARATRANZ_CACHE_DIR = os.environ.get("PARATRANZ_CACHE_DIR", ".paratranz_cache")

Expand Down

0 comments on commit 1269978

Please sign in to comment.