Skip to content

[CI] Add template icafe #71901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/Check-pr-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Check pr template

on:
pull_request_target:
types: [opened, synchronize, reopened, edited]

env:
AGILE_PULL_ID: ${{ github.event.pull_request.number }}
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
check:
name: Check PR template
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Clone paddle
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
fetch-depth: 1000

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'

- name: Install dependencies
run: |
pip install httpx

- name: Check PR Template
run: |
python tools/CheckPRTemplate.py; EXCODE=$?
echo "EXCODE: $EXCODE"
echo "ipipe_log_param_EXCODE: $EXCODE"
set +x
if [[ "$EXCODE" != "0" ]];then
echo -e "######################################################"
echo -e "If you encounter a situation where the PR template does not match the error message, please use the following link to update your PR: [ https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/.github/PULL_REQUEST_TEMPLATE.md ]"
echo -e "##ReferenceDocumentation: ##"
echo -e "[ https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE ]"
echo -e "[ https://github.com/PaddlePaddle/Paddle/wiki/paddle_ci_manual ]"
echo -e "######################################################"
fi

- name: Icafe_log
env:
AGILE_COMPILE_BRANCH: ${{ github.event.pull_request.base.ref }}
method: check_pr
icafe_download_url: ${{ secrets.ICAFE_DOWNLOAD_URL }}
icafe_url: ${{ secrets.ICAFE_URL }}
icafe_user: ${{ secrets.ICAFE_USER }}
icafe_pwd: ${{ secrets.ICAFE_PWD }}
db_host: ${{ secrets.DB_HOST }}
db_port: ${{ secrets.DB_PORT }}
db_user: ${{ secrets.DB_USER }}
db_pd: ${{ secrets.DB_PD }}
db_name: ${{ secrets.DB_NAME }}
icafe_token: ${{ secrets.ICAFE_TOKEN }}
AGILE_CHECKIN_AUTHOR: ${{ github.event.pull_request.user.login }}
AGILE_TRIGGER_USER: ${{ github.event.pull_request.user.login }}
AGILE_REVISION: ${{ github.event.pull_request.head.sha }}
run: |
set +e
wget -q --no-check-certificate $icafe_download_url
python modify_icafe.py
exit 0