Support stable Rust #8
Workflow file for this run
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: pr number | |
permissions: | |
contents: write | |
pull-requests: write | |
on: | |
pull_request: | |
paths: | |
- "CHANGELOG.md" | |
jobs: | |
replace-pr-number: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 0 | |
- name: Replace pr number in CHANGELOG.md | |
run: | | |
sed -i '/^##/,$ {s/#pr/#${{ github.event.pull_request.number }}/g}' ./CHANGELOG.md | |
if [ $(git status --porcelain | wc -l) -eq 0 ]; then | |
echo "No changes to commit." | |
exit 0 | |
fi | |
git config --global user.name "RChangelog[bot]" | |
git config --global user.email 155627257+RChangelog[bot]@users.noreply.github.com | |
git add . | |
git commit --amend --no-edit | |
git push -f | |
- run: gh pr edit "$NUMBER" --add-label "B-test" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_REPO: ${{ github.repository }} | |
NUMBER: ${{ github.event.pull_request.number }} |