-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (73 loc) · 2.4 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Synchronize
on:
schedule:
- cron: '0 * * * *' # every hour
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-serial-run
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: Install poetry
run: |
pipx install poetry
make poetry.lock
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'poetry'
- name: "Updating Dependencies"
run: make update
- id: git-diff
run: git diff --quiet || echo "changes=true" >> $GITHUB_OUTPUT
- id: test-start-server
if: steps.git-diff.outputs.changes == 'true'
uses: ./.github/start-server
- id: pytest
if: steps.git-diff.outputs.changes == 'true'
run: make test
- name: Push Update
if: steps.test-start-server.outcome == 'success' && steps.pytest.outcome == 'success' && github.repository != 'eidolon-ai/agent-machine'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "bumping eidolon version"
sync:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-serial-run
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: Install poetry
run: |
pipx install poetry
make poetry.lock
- name: Syncing fork with upstream
run: |
git config pull.rebase false
git config --global user.email "[email protected]"
git config --global user.name "autosync"
make sync
- id: git-diff
run: git diff --quiet origin/main || echo "changes=true" >> $GITHUB_OUTPUT
- id: test-start-server
if: steps.git-diff.outputs.changes == 'true'
uses: ./.github/start-server
- id: pytest
if: steps.git-diff.outputs.changes == 'true'
run: make test
- name: Push Sync
if: steps.test-start-server.outcome == 'success' && steps.pytest.outcome == 'success' && github.repository != 'eidolon-ai/agent-machine'
run: git push