eclipse-volttron / github-tooling

Other
0 stars 4 forks source link

Create workflow that updates based upon schedule #10

Open craig8 opened 1 year ago

craig8 commented 1 year ago

The goal of this is to have the main volttron-core repository always up to date with the latest version of dependencies. So a successful completion of this issue will have the following attributes.

All of these should commit to the develop branch after running tests.

Gotchas:

craig8 commented 1 year ago

The following is an update of poetry dependencies

name: Update Project Dependencies

# Schedules will only run on the default branch.  So in order for this
# to work properly we have to specify the branch that we should be checking
# out in order for this to work properly.
on:
  schedule:
    # Daily at 1am
    - cron: "0 1 * * *"

env:
  CHECKOUT_BRANCH: develop

jobs:

  update-dependencies:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.8]

    steps:
      # Only update on develop branch
      - uses: actions/checkout@v3
        with:
          ref: develop
      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Run image
        uses: abatilo/actions-poetry@v2.0.0
        with:
          poetry-version: 1.2.0b2
      - name: upgrade dependencies
        run: poetry update
      - name: Commit back to branch
        uses: EndBug/add-and-commit@v9
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          add: pyproject.toml poetry.lock
          author_email: 3979063+craig8@users.noreply.github.com
          author_name: update dependency action
          commit: --signoff