forked from hanyuanda/mimotion2024
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
82d3fd7
commit e552a3d
Showing
7 changed files
with
82 additions
and
54 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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,23 @@ | ||
name: Random Cron | ||
on: | ||
workflow_run: | ||
workflows: ["刷步数"] | ||
types: | ||
- completed | ||
jobs: | ||
repo-sync: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
if: github.event.workflow_run.conclusion == 'success' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.PAT }} #此处PAT需要申请,教程详见:https://www.jianshu.com/p/bb82b3ad1d11,需要repo和workflow权限 | ||
- name: random cron | ||
run: | | ||
sed -i -E "s/(- cron: ')[0-9]+( [^[:space:]]+ \* \* \*')/\1$(($RANDOM % 10))\2/g" .github/workflows/run.yml | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add . | ||
git commit -m "random cron" | ||
git push origin master |
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,39 @@ | ||
name: 刷步数 | ||
|
||
on: | ||
#push: | ||
# branches: [ main ] | ||
#pull_request: | ||
# branches: [ main ] | ||
schedule: | ||
- cron: '0 0,4,7,10,12,14 * * *' | ||
watch: | ||
types: started | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: github.event.repository.owner.id == github.event.sender.id | ||
|
||
steps: | ||
- name: Checkout codes | ||
uses: actions/checkout@v2 | ||
- name: Update system and install zsh | ||
run: | | ||
sudo -E apt-get -qq update | ||
sudo -E apt-get install zsh -y | ||
- name: 初始化Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: 开始 | ||
run: | | ||
pip3 install requests | ||
user='${{ secrets.USER }}' | ||
passwd='${{ secrets.PWD }}' | ||
open_get_weather='${{ secrets.OPEN_GET_WEATHER }}' | ||
area='${{ secrets.AREA }}' | ||
python3 main.py ${user} ${passwd} ${open_get_weather} ${area} |
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 @@ | ||
/.idea/ |
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 was deleted.
Oops, something went wrong.
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