Skip to content

Commit e6442fb

Browse files
committed
wip feat: workflow to update all children
1 parent 2bbb876 commit e6442fb

4 files changed

Lines changed: 65 additions & 7 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Trigger update pipeline"
2+
description: "Call a workflow"
3+
inputs:
4+
REPO_NAME:
5+
required: true
6+
description: "Identifier of the repo in which to trigger an update"
7+
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: create update in child repo
13+
shell: bash
14+
run: |
15+
curl -X 'POST' \
16+
"https://gitea.psi.ch/api/v1/repos/bec/${{ inputs.REPO_NAME }}/actions/workflows/create_update_pr.yml/dispatches?token=${{ secrets.CI_DEPLOY_GITEA }}" \
17+
-H 'accept: application/json' \
18+
-H 'Content-Type: application/json' \
19+
\"ref\": \"refs/heads/main\"
20+
}"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Update Beamline Plugin Repositories
2+
on:
3+
workflow_dispatch
4+
5+
jobs:
6+
a:
7+

template/.gitea/workflows/ci.yml.jinja

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ jobs:
4646
with:
4747
python-version: "{% raw %}${{ inputs.PYTHON_VERSION || '3.11' }}{% endraw %}"
4848

49+
- name: Checkout BEC Plugin Repository
50+
uses: actions/checkout@v4
51+
with:
52+
repository: bec/{{ project_name }}
53+
ref: "{% raw %}${{ inputs.BEC_PLUGIN_REPO_BRANCH || github.head_ref || github.sha }}{% endraw %}"
54+
path: ./{{ project_name }}
55+
56+
- name: Lint for merge conflicts
57+
run: |
58+
59+
4960
- name: Checkout BEC Core
5061
uses: actions/checkout@v4
5162
with:
@@ -67,13 +78,6 @@ jobs:
6778
ref: "{% raw %}${{ inputs.BEC_WIDGETS_BRANCH || 'main' }}{% endraw %}"
6879
path: ./bec_widgets
6980

70-
- name: Checkout BEC Plugin Repository
71-
uses: actions/checkout@v4
72-
with:
73-
repository: bec/{{ project_name }}
74-
ref: "{% raw %}${{ inputs.BEC_PLUGIN_REPO_BRANCH || github.head_ref || github.sha }}{% endraw %}"
75-
path: ./{{ project_name }}
76-
7781
- name: Install dependencies
7882
shell: bash
7983
run: |
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Create template upgrade PR for {{ project_name }}
2+
on:
3+
workflow_dispatch:
4+
5+
permissions:
6+
pull-requests: write
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Setup Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.11'
17+
18+
- name: Install tools
19+
run: |
20+
pip install copier
21+
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Perform update
26+
run: |
27+
copier update --trust --defaults --conflict inline

0 commit comments

Comments
 (0)