新增项目:北京理工大学-计算机科学与技术-计科课程资料-持续更新 #76
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: Add a project | |
on: | |
issue_comment: | |
types: [created, edited] | |
jobs: | |
add-project: | |
if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'add-project') && startsWith(github.event.comment.body, '/draft-pr') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
cache-dependency-path: justfile | |
- uses: extractions/setup-just@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: just bootstrap | |
- run: just add-project ${{ github.event.issue.number }} | |
env: | |
# For GitHub CLI | |
GH_TOKEN: ${{ github.token }} | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: | | |
create-pull-request/patch-for-issue-${{ github.event.issue.number }} | |
commit-message: | | |
[projects] ${{ github.event.issue.title }} | |
Resolves #${{ github.event.issue.number }} | |
title: "[projects] ${{ github.event.issue.title }}" | |
body: | | |
## 这个拉取请求做了什么? | |
- [x] 新增项目 | |
## 更改 | |
Resolves #${{ github.event.issue.number }} | |
## 最后检查 | |
- [ ] 我已阅读[贡献者指南](https://github.com/best-of-lists/best-of/blob/main/CONTRIBUTING.md)。 | |
- [x] 我没有直接更改`README.md`。(`README.md`是从`projects.yaml`自动生成的) | |
draft: true |