-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (34 loc) · 1.04 KB
/
auto-update.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
name: Auto Update
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Run script to check for changes
id: check
run: yes | python scripts/update.py
- name: Check for code diffs
id: diff
run: echo "diff=$(git diff --name-only)" >> "$GITHUB_OUTPUT"
- name: Create pull request
if: steps.diff.outputs.diff != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.check.outputs.version }}
run: |
git add -A
git checkout -b "elixir-ls-$VERSION"
git config user.name 'Po Chen'
git config user.email '[email protected]'
git commit -m "Bump elixir-ls to $VERSION"
git push origin "elixir-ls-$VERSION"
gh pr create --fill