diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-07-20 09:27:54 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-07-20 09:28:42 +0200 |
commit | 0ebed403e3a513d42ab052f8ab37dfdf5126d6b6 (patch) | |
tree | 3820c6f1b515cb51400e0612baaf17d55c692cd3 | |
parent | 72d0ba9039fb26bc5536c56a9214d30e2fcf629a (diff) | |
download | qutebrowser-0ebed403e3a513d42ab052f8ab37dfdf5126d6b6.tar.gz qutebrowser-0ebed403e3a513d42ab052f8ab37dfdf5126d6b6.zip |
ci: Fix/improve update requirements workflow
- Set up Python 3.7 and 3.8
- Add workflow dispatch event to trigger the update
- Add IRC notification
-rw-r--r-- | .github/workflows/recompile-requirements.yml | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/.github/workflows/recompile-requirements.yml b/.github/workflows/recompile-requirements.yml index 2470b4561..cd61dde00 100644 --- a/.github/workflows/recompile-requirements.yml +++ b/.github/workflows/recompile-requirements.yml @@ -5,6 +5,12 @@ on: # Every Monday at 04:05 UTC # https://crontab.guru/#05_04_*_*_1 - cron: '05 04 * * 1' + workflow_dispatch: + inputs: + environment: + descriptions: 'Test environments to update' + required: false + default: '' jobs: update: @@ -13,11 +19,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.7' + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: '3.8' - name: Recompile requirements - run: python3 scripts/dev/recompile_requirements.py + run: "python3 scripts/dev/recompile_requirements.py ${{ github.events.input.environments }}" id: requirements - name: Create pull request uses: peter-evans/create-pull-request@v2 @@ -41,3 +52,27 @@ jobs: I'm a bot, bleep, bloop. :robot: branch: update-dependencies + irc: + timeout-minutes: 2 + continue-on-error: true + runs-on: ubuntu-latest + needs: [update] + if: "always() && github.repository == 'qutebrowser/qutebrowser'" + steps: + - name: Send success IRC notification + uses: Gottox/irc-message-action@v1 + if: "needs.update.result == 'success'" + with: + server: chat.freenode.net + channel: '#qutebrowser-dev' + nickname: qutebrowser-bot + message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})" + - name: Send non-success IRC notification + uses: Gottox/irc-message-action@v1 + if: "needs.update.result != 'success'" + with: + server: chat.freenode.net + channel: '#qutebrowser-dev' + nickname: qutebrowser-bot + message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})\n + linters: ${{ needs.linters.result }}, tests: ${{ needs.tests.result }}, tests-docker: ${{ needs.tests-docker.result }}, codeql: ${{ needs.codeql.result }}" |