Skip to content

Commit 3531a66

Browse files
chore: update workflow
1 parent 9660efd commit 3531a66

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/sync-workflows.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 5
1313
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+
1420
- name: Sync workflows
1521
uses: technote-space/create-pr-action@v2
1622
with:
@@ -21,7 +27,7 @@ jobs:
2127
git clone --depth=1 https://github.com/technote-space/github-actions-workflows.git .github/workflows/.tmp/workflows
2228
2329
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
2531
2632
rm -rdf .github/workflows/.tmp
2733
COMMIT_MESSAGE: 'chore: sync workflows'

0 commit comments

Comments
 (0)