File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11
11
runs-on : ubuntu-latest
12
12
timeout-minutes : 5
13
13
steps :
14
+ - name : Set variables
15
+ run : |
16
+ echo "::set-env name=MINUTE::$(echo "${GITHUB_REPOSITORY}" | md5sum | tr -d -c 0-9 | xargs -I{} echo {}123456789 | cut -c 2-9 | xargs -I{} bash -c 'echo $(({} % 60))')"
17
+ echo "::set-env name=HOUR::$(echo "${GITHUB_REPOSITORY}" | md5sum | tr -d -c 0-9 | xargs -I{} echo {}123456789 | cut -c 2-9 | xargs -I{} bash -c 'echo $(({} % 24))')"
18
+ echo "::set-env name=DAY::$(echo "${GITHUB_REPOSITORY}" | md5sum | tr -d -c 0-9 | xargs -I{} echo {}123456789 | cut -c 2-9 | xargs -I{} bash -c 'echo $(({} % 7))')"
19
+
14
20
- name : Sync workflows
15
21
uses : technote-space/create-pr-action@v2
16
22
with :
21
27
git clone --depth=1 https://github.com/technote-space/github-actions-workflows.git .github/workflows/.tmp/workflows
22
28
23
29
bash .github/workflows/.tmp/workflows/ts-repo/copy.sh release
24
- sed -i ' s/cron:.\+$/cron: 0 9 * * 2,5/' .github/workflows/update-dependencies.yml
30
+ sed -i " s/cron:.\+$/cron: ${MINUTE} ${HOUR} * * ${DAY}/" .github/workflows/update-dependencies.yml
25
31
26
32
rm -rdf .github/workflows/.tmp
27
33
COMMIT_MESSAGE : ' chore: sync workflows'
You can’t perform that action at this time.
0 commit comments