Skip to content

Commit 6594a04

Browse files
ci: Standardise and create daily dependency updates (#2633)
* ci: Standardise and create security chekcs * let's try * submodules rename * submodules rename * Update to run-workflow * Update command to poetry 2 * Test one last time * Remove push * satisfy greptile
1 parent 7e0de65 commit 6594a04

7 files changed

+100
-4
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: tidy3d-python-client-daily
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 5 * * *' # Runs at 5am UTC
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
update-lockfile:
14+
uses: ./.github/workflows/tidy3d-python-client-update-lockfile.yml
15+
with:
16+
run-workflow: true
17+
secrets: inherit
18+
19+
submodule-tests:
20+
uses: ./.github/workflows/tidy3d-python-client-submodules-test.yml
21+
with:
22+
run-workflow: true
23+
secrets: inherit
File renamed without changes.

.github/workflows/test_daily_latest_submodule.yaml renamed to .github/workflows/tidy3d-python-client-submodules-test.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
name: "tidy3d-submodule-daily-tests"
1+
name: "tidy3d-submodule-tests"
22

33
on:
44
workflow_dispatch:
5-
schedule:
6-
- cron: '0 9 * * *' # Runs at 9am UK-time every day
5+
inputs:
6+
run-workflow:
7+
required: true
8+
type: boolean
9+
default: true
710

11+
workflow_call:
12+
inputs:
13+
run-workflow:
14+
required: true
15+
type: boolean
16+
default: true
817

918
jobs:
1019
test-latest-submodules:
1120
runs-on: ubuntu-latest
21+
if: github.event.inputs.run-workflow || inputs.run-workflow
1222
steps:
1323
- name: Checkout repository with submodules
1424
uses: actions/checkout@v4
@@ -104,4 +114,4 @@ jobs:
104114
echo "Submodule $FAQ_PATH is up to date."
105115
fi
106116
fi
107-
done
117+
done
File renamed without changes.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: update-lockfile-PR
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
run-workflow:
7+
description: 'Set to true to update the lock file and create a PR'
8+
required: true
9+
type: boolean
10+
default: true
11+
12+
workflow_call:
13+
inputs:
14+
run-workflow:
15+
description: 'Set to true to update the lock file and create a PR'
16+
required: true
17+
type: boolean
18+
default: true
19+
20+
jobs:
21+
update-lockfile:
22+
if: github.event.inputs.run-workflow || inputs.run-workflow
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
submodules: false
33+
34+
- name: Set up Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: '3.9'
38+
39+
- name: Install Poetry
40+
uses: snok/install-poetry@v1
41+
with:
42+
version: 2.1.1
43+
virtualenvs-create: true
44+
virtualenvs-in-project: true
45+
46+
- name: Update lock file
47+
run: |
48+
set -e
49+
poetry update --lock
50+
51+
- name: Create Pull Request
52+
uses: peter-evans/create-pull-request@v6
53+
with:
54+
token: ${{ secrets.GITHUB_TOKEN }}
55+
commit-message: "chore(deps): :robot: Daily update `poetry.lock`"
56+
title: "chore(deps): :robot: Daily update `poetry.lock`"
57+
body: |
58+
This pull request was automatically generated by a GitHub Action.
59+
60+
It updates the `poetry.lock` file to reflect changes in the pip state, and whether the package is broken by external dependency changes.
61+
branch: "daily-chore/update-poetry-lock"
62+
base: "develop"
63+
delete-branch: true

0 commit comments

Comments
 (0)