Fix order or migrations #1130
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
name: Fast-forward merge a pull request | |
on: | |
issue_comment: | |
types: | |
- created | |
- edited | |
jobs: | |
fast-forward: | |
name: "Fast-forward" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Allows merging the PR. | |
pull-requests: write # Writing comments on PRs. | |
issues: write # Also required for posting comments on PRs. | |
# Only run if the comment is one of the defined keywords. | |
if: >- | |
${{ | |
github.event.issue.pull_request | |
&& contains(fromJSON('["/fast-forward", "/ff"]'), github.event.comment.body) | |
}} | |
steps: | |
- name: "Fast forwarding" | |
uses: MrThearMan/prff@v1 | |
- name: "Trigger additional pipelines for bots" | |
# Only run if one of the defined bots is the pull request author. | |
# https://github.com/City-of-Helsinki/tilavarauspalvelu-core/settings/variables/actions | |
if: contains(fromJSON(vars.BOTS), github.event.pull_request.user.login) | |
# We need to trigger additional pipelines manually, | |
# since new pushes to main by bots do not trigger additional workflows. | |
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication | |
# Triggers all workflows with the `fast-forward` in `repository_dispatch`. | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
-H "User-Agent: ${{ github.repository }}" \ | |
https://api.github.com/repos/${{ github.repository }}/dispatches \ | |
-d '{"event_type":"fast-forward"}' |