我怎么可以做一份工作,在审查行动运行之间随机1和50次一天?
这是我计划任务的工作。
cron:'0 0 * * *'
这将每天运行一次。
但是我想要的是运行随机的1-50次一天。
我怎么让它随意从1到50?
下面是我的混帐行动的阳明海运设定文件作为工作流程
#1. Repository Fork
# 2. Modify the files A and B according to the procedure
# 3. After committing the modifications, push & Enjoy!
name: planting-grass
# A. Comment lines 8-11
# on:
# push:
# branches:
# - unknown
# B. Uncomment lines 14-16
on:
schedule:
- cron: '0 0 * * *'
jobs:
task:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Execute commands
run: bash ./task.sh ${{ steps.date.outputs.date }}
- name: Commit files
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git add date.txt
git commit -m ${{ steps.date.outputs.date }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
Cron作业,并随机的时候,在给定时间 的方法,通过这个岗位不工作。
最好的问候!