어떻게 만들 수 있습니 작업에 github 작업 실행하이 무작위로 1~50 회?
여기에 내 cron 작업입니다.
cron:'0 0 * * *'
이 하루에 한 번 실행됩.
하지만 내가 원하는 것은 무작위로 실행 1-50 니다.
나는 어떻게 작동하도록에서 무작위로 1~50?
아래 내 git 작업의 yml 설정 파일 워크플로
#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 작업 및 임의의 시간 이내에,주어진 시간 에 방법을 통해 이 게시물 작동하지 않습니다.
Best Regards!