Skip to content

timeline-check

timeline-check #16185

Workflow file for this run

name: timeline-check
on:
pull_request:
types: [labeled, unlabeled, opened, synchronize, reopened]
merge_group:
jobs:
pr-number-assign:

Check failure on line 9 in .github/workflows/timeline-check.yml

View workflow run for this annotation

GitHub Actions / timeline-check

Invalid workflow file

The workflow is not valid. .github/workflows/timeline-check.yml (Line: 9, Col: 3): Error calling workflow 'lablup/backend.ai/.github/workflows/pr-number-assign.yml@c4cab2b6c0e51327a823ef7a1d670e4779b5495c'. The workflow is requesting 'contents: write', but is only allowed 'contents: read'.
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:changelog') && github.event.pull_request.number != null && github.event.pull_request.merged == false }}
uses: ./.github/workflows/pr-number-assign.yml
secrets:
WORKFLOW_PAT: ${{ secrets.WORKFLOW_PAT }}
towncrier:
needs: [pr-number-assign]
runs-on: ubuntu-latest
steps:
- name: Get PR's fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: Checkout the revision
uses: actions/checkout@v4
with:
lfs: false
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
sparse-checkout: |
changes
tools
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
check-latest: true
- name: Install dependencies
run: |
python -m pip install -U pip setuptools
python -m pip install -U -r tools/towncrier-requirements.txt
- name: Check existence of news fragment
run: |
BASE_COMMIT=$(git rev-list --first-parent --max-parents=0 --max-count=1 HEAD)
BASE_TIMESTAMP=$(git log --format=%ct "${BASE_COMMIT}")
git fetch --no-tags --shallow-since "${BASE_TIMESTAMP}" origin "${BASE_REF}"
python -m towncrier.check --compare-with=origin/${BASE_REF}
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}