ako môžem získať prácu v github akcii beh náhodne medzi 1 až 50-krát za deň?
Tu je môj cronu.
cron: '0 0 * * *'
To bude spustiť raz denne.
Ale to, čo chcem, je spustiť náhodne 1-50 krát denne.
Ako môžem, aby to fungovalo náhodne od 1 do 50?
nižšie je moja git akcie je yml nastavenie súbor pracovných postupov
#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 a náhodných časoch, v rámci danej hodiny metóda cez tento príspevok nefunguje.
S Pozdravom!