Skip to content

Commit e16ae7d

Browse files
authored
Add workflow to rebuild UI every week
1 parent c4a2747 commit e16ae7d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/rebuild.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Rebuild sample
2+
on:
3+
schedule:
4+
- cron: 0 0 * * 2
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
permissions:
13+
contents: write # for peter-evans/create-pull-request to create branch
14+
pull-requests: write # for peter-evans/create-pull-request to create a PR
15+
name: Rebuild
16+
if: github.repository == 'CrowdStrike/foundry-sample-functions-python'
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
- name: Install dependencies
25+
run: npm ci
26+
working-directory: ui/extensions/hello
27+
- name: Build React app
28+
run: npm run build
29+
working-directory: ui/extensions/hello
30+
- name: Create commit
31+
run: |
32+
git add .
33+
git commit -a -m "Rebuild with latest dependencies" || true
34+
- name: Create Pull Request
35+
uses: peter-evans/create-pull-request@v7
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
commit-message: 'Rebuild with latest dependencies'
39+
title: 'Rebuild with latest dependencies'
40+
body: Weekly build with latest dependencies.
41+
labels: 'dependencies'

0 commit comments

Comments
 (0)