-
Notifications
You must be signed in to change notification settings - Fork 5
32 lines (27 loc) · 956 Bytes
/
weekly.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
name: Weekly Update
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 0 * * 0" # yamllint disable-line rule:quoted-strings
workflow_dispatch: {}
permissions: read-all
jobs:
trunk-upgrade:
name: Upgrade Trunk
runs-on: ubuntu-latest
permissions:
contents: write # For trunk to create PRs
pull-requests: write # For trunk to create PRs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Trunk Upgrade
uses: trunk-io/trunk-action/upgrade@v1
with:
base: master
- name: Notify Slack
if: failure()
run: |
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
MSG_TEXT="Weekly job failed! Check the run here: $RUN_URL"
curl -X POST -H 'Content-type: application/json' --data '{"text":"'"$MSG_TEXT"'"}' ${{ secrets.SLACK_WEBHOOK_URL }}