| name: update_conda_lock |
| |
| on: |
| push: |
| schedule: |
| - cron: '0 3 * * 0' |
| workflow_dispatch: |
| |
| jobs: |
| update-locks: |
| runs-on: ubuntu-18.04 |
| strategy: |
| fail-fast: false |
| steps: |
| - name: Checkout Repository |
| uses: actions/checkout@v2 |
| with: |
| fetch-depth: 0 |
| submodules: 'recursive' |
| ssh-key: ${{ secrets.SSH_DEPLOY_KEY }} |
| |
| - name: Update Conda Lock |
| uses: SymbiFlow/actions/update_conda_lock@c6142a4ec7859653352757eb8f7c4630f63f96e3 |
| with: |
| conda_lock_file: 'conda_lock.yml' |
| environment_file: 'environment.yml' |
| |
| - name: Check diff |
| id: check-diff |
| run: | |
| if [[ $(git status --porcelain --ignore-submodules) ]]; then echo "::set-output name=changes::true"; else echo "::set-output name=changes::false"; fi |
| |
| - name: Issue Pull Request |
| if: ${{ github.ref == 'refs/heads/master' && steps.check-diff.outputs.changes == 'true' }} |
| uses: peter-evans/create-pull-request@v3 |
| with: |
| token: ${{ secrets.GITHUB_TOKEN }} |
| author: GitHub <noreply@github.com> |
| commit-message: "[BOT] Conda Lock Update" |
| title: "[BOT] Conda Lock Update" |
| body: Pull Request created by the conda lock update workflow. |
| branch: bot-conda-lock-update |
| labels: bot-conda-lock-update,kokoro:force-run,merge-if-green |
| delete-branch: true |
| signoff: true |