dev-tools update #961
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
# On a schedule, this workflow checks whether new tool versions have been | |
# released. If so, this workflow runs `update-dev-tools.sh`, which updates the | |
# tool versions in the Dockerfile. It then opens and auto-merges an update PR. | |
name: dev-tools update | |
on: | |
schedule: | |
# run once, each monday+wednesday+friday, at 4AM PST (UTC-8:00) | |
- cron: '0 12 * * 1,3,5' | |
workflow_dispatch: | |
jobs: | |
create-pr: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: update dockerfiles | |
run: src/update-dev-tools.sh | |
- name: run diff | |
run: git diff | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v3 | |
id: create-pr | |
with: | |
title: '[Auto] Update hlint and fourmolu image' | |
body: 'This PR should be approved once the latest HLS includes this fourmolu version.' | |
branch: auto/update-image | |
# Github won't run actions when triggered by a github token, intentional limitation. | |
# Their workaround is to use personal tokens, we use a purpose-made token for fossabot. | |
token: ${{ secrets.FOSSABOT_TOKEN }} | |
- name: Enable auto-merge | |
uses: peter-evans/enable-pull-request-automerge@v1 | |
if: steps.create-pr.outputs.pull-request-operation == 'created' | |
with: | |
# Same reason as above | |
token: ${{ secrets.FOSSABOT_TOKEN }} | |
merge-method: squash | |
pull-request-number: ${{ steps.create-pr.outputs.pull-request-number }} |