Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Kiwi/.github/workflows/changelog.yml
View runs Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
32 lines (25 sloc)
1.05 KB
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: changelog | |
| on: | |
| pull_request: | |
| jobs: | |
| acceptance: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: check-source-branch-and-modified-files | |
| run: | | |
| # fail if curl fails | |
| set -e | |
| echo "INFO: source branch is: ${{ github.head_ref }}" | |
| echo "INFO: modified files" | |
| curl -o- -L "${{ github.event.pull_request.diff_url }}" 2>/dev/null | grep "^diff --git" | |
| set +e | |
| # if this PR modifies the CHANGELOG file it needs to come from a branch | |
| # that follows the pattern 'prepare/vX.Y' b/c we want to run some extra jobs for such branches! | |
| if curl -o- -L "${{ github.event.pull_request.diff_url }}" 2>/dev/null | grep "^diff --git" | grep "CHANGELOG"; then | |
| if [[ ! "${{ github.head_ref }}" =~ ^prepare/v.+$ ]]; then | |
| echo "FAIL: Modifications to CHANGELOG are only accepted from 'prepate/vX.Y' branches!" | |
| echo "INFO: Otherwise aarch64 jobs in Circle CI will not be executed." | |
| exit 1 | |
| fi | |
| fi |