π Auto-update CraftCMS versions on new release #68
This file contains hidden or 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: π Auto-update CraftCMS versions on new release | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # every day at 00:00 UTC (midnight) | |
| workflow_dispatch: # allow manual manual run via UI | |
| jobs: | |
| update-craft-versions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout this repo | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: π Setup Git config | |
| run: | | |
| git config user.name "GitHub Action Bot π€" | |
| git config user.email "[email protected]" | |
| - name: π¦ Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y jq perl | |
| - name: π§± Run make update | |
| run: make update | |
| - name: πͺ Create pull request if versions file changed | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
| commit-message: "π Update CraftCMS versions matrix" | |
| title: "π Update CraftCMS test matrix" | |
| body: | | |
| A new CraftCMS version has been released and the test matrix has been updated. | |
| @hadomskyi please review and open branch `ci/4.x-update-craft-versions-$(date +'%Y%m%d-%H%M%S')` | |
| branch: ci/4.x-update-craft-versions | |
| base: 4.x-fix-start-job | |
| delete-branch: true |