更改打包标签 #4
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
name: Save as dict | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out GitHub repository | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Saving as dict | |
run: python3 ./save_dict.py | |
- name: Pushing via git | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
run: | | |
mkdir -p ~/.ssh | |
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | |
git remote add target [email protected]:Project-Mealuet/ModsTranslation.git | |
git config --global user.email "[email protected]" | |
git config --global user.name "Mealuet Bot" | |
git add dict | |
git commit -m "更新翻译字典" | |
git push target HEAD:main |