Synchronize #1389
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |