-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.47 KB
/
scheduler.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Weekly Release Check
on:
workflow_dispatch:
schedule:
- cron: "0 14 * * 1"
jobs:
updater:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Set up Go
uses: actions/setup-go@v5.2.0
with:
go-version-file: "go.mod"
- name: Run
run: make run
env:
GITHUB_TOKEN: ${{ secrets.AUTOUPDATER_TOKEN }}
- name: Print outputs
id: version-update
run: |
VERSION=`cat .deployed-version`
echo "deployed_version=$VERSION" >> $GITHUB_ENV
- name: Print outputs
id: version-update-success
run: |
VERSION=`cat .hugo-version`
echo "hugo_version=$VERSION" >> $GITHUB_ENV
- name: Test outputs
run: |
echo "Version ${{env.deployed_version}} / ${{ env.hugo_version }}"
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: "Weekly Release Check"
SLACK_MESSAGE: "Version ${{env.deployed_version}} / ${{ env.hugo_version }} :rocket:"
- name: "Update changelog"
run: |
git config user.name github-actions
git config user.email github-actions@github.com
echo "- [`date +"%Y-%m-%d"`] Version ${{env.deployed_version}} / ${{ env.hugo_version }}" >> CHANGELOG.md
git add .
git commit -am "Update changelog"
git push