-
Notifications
You must be signed in to change notification settings - Fork 156
43 lines (40 loc) · 1.29 KB
/
bump-fcs.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
name: update nightly FCS
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
jobs:
bump-fcs:
name: bump FCS to latest nightly
runs-on: ubuntu-latest
steps:
- name: checkout nightly branch
uses: actions/checkout@v3
with:
ref: nightly
# using a custom token instead of GITHUB_TOKEN allows other workflows to trigger as a result of the push
token: ${{ secrets.FCS_NIGHTLY_UPDATE_TOKEN }}
- name: configure .NET
uses: actions/setup-dotnet@v2
- name: restore tools
run: dotnet tool restore
- name: bump FCS
run: dotnet paket update FSharp.Compiler.Service
- name: check if there are changes
continue-on-error: true # nonzero exit codes are expected if there are changes
id: check
run: |
git diff --exit-code
if [ $? -eq 0 ]; then
echo "::set-output name=changed::false"
else
echo "::set-output name=changed::true"
fi
- name: commit changes
if: steps.check.outputs.changed
run: |
git config user.name github-actions
git config user.email [email protected]
git add paket.lock
git commit -m "updated FCS to the latest nightly"
git push