forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 132
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
360 changed files
with
34,686 additions
and
36,756 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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Check Master Merged | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check-master-merged: | ||
runs-on: ubuntu-latest | ||
if: github.head_ref == 'merge-upstream' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.base_ref }} | ||
|
||
- name: Fetch head branch | ||
run: git fetch origin ${{ github.head_ref }} | ||
|
||
- name: Check if master is merged | ||
run: | | ||
git checkout ${{ github.head_ref }} | ||
if git merge-base --is-ancestor origin/${{ github.base_ref }} HEAD; then | ||
exit 0 | ||
else | ||
echo "Base branch is NOT merged into the head branch. Merge base branch to keep CI checks relevant." | ||
exit 1 | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Merge Upstream | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
merge-upstream: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- id: create_token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- run: echo "GH_TOKEN=${{ steps.create_token.outputs.token }}" >> "$GITHUB_ENV" | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install PyGithub openai | ||
- name: Download the script | ||
run: | | ||
wget https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/tools/changelog/changelog_utils.py | ||
wget https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/tools/merge-upstream/merge_upstream.py | ||
wget https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/tools/merge-upstream/translation_context.txt | ||
- name: Run the script | ||
env: | ||
GITHUB_TOKEN: ${{ env.GH_TOKEN }} | ||
TARGET_REPO: 'ss220club/Paradise-SS220' | ||
TARGET_BRANCH: 'master' | ||
UPSTREAM_REPO: 'ParadiseSS13/Paradise' | ||
UPSTREAM_BRANCH: 'master' | ||
MERGE_BRANCH: 'merge-upstream' | ||
CHANGELOG_AUTHOR: 'ParadiseSS13' | ||
TRANSLATE_CHANGES: 'true' | ||
OPENAI_API_KEY: ${{ secrets.ORG_EMPTY_TOKEN }} | ||
LOG_LEVEL: ${{ runner.debug && 'DEBUG' || 'INFO' }} | ||
run: | | ||
git config --global user.email "action@github.com" | ||
git config --global user.name "Upstream Sync" | ||
python3 -u merge_upstream.py |
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
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
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
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
Oops, something went wrong.