Merge pull request #6482 from vector-im/feature/bma/check_towncrier

Add GitHub action to check for a towncrier file
This commit is contained in:
Benoit Marty 2022-07-11 17:03:52 +02:00 committed by GitHub
commit de3a070710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 5 deletions

View File

@ -203,3 +203,26 @@ jobs:
name: detekt-report
path: |
*/build/reports/detekt/detekt.html
towncrier:
name: Towncrier check
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.head_ref == 'develop'
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install towncrier
run: |
python3 -m pip install towncrier
- name: Run towncrier
# Fetch the pull request' base branch so towncrier will be able to
# compare the current branch with the base branch.
# Source: https://github.com/actions/checkout/#fetch-all-branches.
run: |
git fetch --no-tags origin +refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH}
towncrier check --compare-with origin/${BASE_BRANCH}
env:
BASE_BRANCH: ${{ github.base_ref }}