-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (34 loc) · 1.08 KB
/
node.js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# This workflow will build the index.json file, then push the change to the main branch
name: Build Action
on:
pull_request_target:
branches:
- main
jobs:
build:
name: Rebuild Manifest
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: git config --local user.name ${{ github.actor }}
- run: git add index.json
- run: git commit -m "Automatic manifest update"
- name: Push to GitHub
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{github.event.pull_request.head.ref}}
force: true