Auto Update HumHub #1037
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 HumHub | |
| on: | |
| repository_dispatch: | |
| types: check-update | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| jobs: | |
| execute: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set git config | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| - name: Execute Update | |
| id: update | |
| run: | | |
| . ./update.sh | |
| { echo "CUR_VERSION=$CUR_VERSION"; echo "NEW_VERSION=$NEW_VERSION"; echo "GIT_BRANCH=$GIT_BRANCH"; } >> "$GITHUB_ENV" | |
| - name: Check git status and log | |
| run: | | |
| git status | |
| git log | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: "${{ env.GIT_BRANCH }}" | |
| - name: Create Pull Request | |
| uses: repo-sync/pull-request@v2 | |
| with: | |
| source_branch: "${{ env.GIT_BRANCH }}" | |
| destination_branch: "master" | |
| pr_title: "Bump HumHub to ${{ env.NEW_VERSION }}" | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |