diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml new file mode 100644 index 0000000..a06aa0a --- /dev/null +++ b/.github/workflows/rebuild.yml @@ -0,0 +1,41 @@ +name: Rebuild sample UI +on: + schedule: + - cron: 0 0 * * 2 + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + permissions: + contents: write # for peter-evans/create-pull-request to create branch + pull-requests: write # for peter-evans/create-pull-request to create a PR + name: Rebuild + if: github.repository == 'CrowdStrike/foundry-sample-functions-python' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Install dependencies + run: npm ci + working-directory: ui/extensions/hello + - name: Build React app + run: npm run build + working-directory: ui/extensions/hello + - name: Create commit + run: | + git add . + git commit -a -m "Rebuild UI with latest dependencies" || true + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'Rebuild with latest dependencies' + title: 'Rebuild with latest dependencies' + body: Weekly build with latest dependencies. + labels: 'dependencies'