@@ -1,4 +1,4 @@
|
||||
name: Create template upgrade PR for bec_testing_plugin
|
||||
name: Create template upgrade PR for {{ project_name }}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -17,14 +17,14 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
|
||||
- name: Install tools
|
||||
run: |
|
||||
pip install bec_lib copier PySide6
|
||||
pip install copier PySide6 bec_lib
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
||||
- name: Perform update
|
||||
run: |
|
||||
git config --global user.email "bec_ci_staging@psi.ch"
|
||||
@@ -35,8 +35,10 @@ jobs:
|
||||
git checkout -b $branch
|
||||
|
||||
echo "Running copier update..."
|
||||
output="$(copier update --trust --defaults --conflict inline 2>&1)"
|
||||
echo "$output"
|
||||
copier update --trust --defaults --conflict inline 2>&1 | tee copier.log
|
||||
status=${PIPESTATUS[0]}
|
||||
output="$(cat copier.log)"
|
||||
echo $output
|
||||
msg="$(printf '%s\n' "$output" | head -n 1)"
|
||||
|
||||
if ! grep -q "make_commit: true" .copier-answers.yml ; then
|
||||
@@ -51,8 +53,8 @@ jobs:
|
||||
fi
|
||||
|
||||
git push -u origin $branch
|
||||
curl -X POST "https://gitea.psi.ch/api/v1/repos/${{ gitea.repository }}/pulls" \
|
||||
-H "Authorization: token ${{ secrets.CI_REPO_WRITE }}" \
|
||||
curl -X POST "https://gitea.psi.ch/api/v1/repos/{{ "${{ gitea.repository }}" }}/pulls" \
|
||||
-H "Authorization: token {{ "${{ secrets.CI_REPO_WRITE }}" }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"title\": \"Template: $(echo $msg)\",
|
||||
|
||||
Reference in New Issue
Block a user