-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (33 loc) · 1.12 KB
/
scheduled.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Scheduled Run
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
scheduled-run:
name: Scheduled Run
runs-on: macos-15
steps:
- name: Show Swift version
run: |
swift --version
swift package --version
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Run releaseSubscriptions
run: |
swift run -c release releaseSubscriptions --access-token ${{ secrets.RELEASE_SUBSCRIPTIONS_FINE_GRAINED_PAT }} --primary-slack-url ${{ secrets.SLACK_WEBHOOK_PRIMARY_URL }} --secondary-slack-url ${{ secrets.SLACK_WEBHOOK_SECONDARY_URL }}
- name: Commit and push if needed
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git diff-index --quiet HEAD || git commit -m 'Apply scheduled running result'
git push --quiet