mirror of
https://github.com/PaiGramTeam/Gift-Code-Web.git
synced 2024-11-16 04:45:25 +00:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Auto update oversea codes
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
workflow_dispatch: ~
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# 此步骤使用 GitHub 的 https://github.com/actions/checkout
|
|
- name: checkout actions
|
|
uses: actions/checkout@v3
|
|
|
|
# 设置python环境
|
|
# 此步骤使用 GitHub 的 https://github.com/actions/setup-python
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: 3.9
|
|
|
|
# 安装依赖
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
# 更新国际服 code
|
|
- name: Update over code
|
|
run: |
|
|
python main.py
|
|
|
|
# Auto commit
|
|
- name: Commit changes
|
|
uses: EndBug/add-and-commit@v9
|
|
with:
|
|
author_name: github-actions[bot]
|
|
author_email: github-actions[bot]@users.noreply.github.com
|
|
push: 'origin remote --force'
|
|
new_branch: 'remote'
|
|
message: ':sparkles: Update Codes'
|
|
add: |
|
|
'data'
|