-
Notifications
You must be signed in to change notification settings - Fork 24
36 lines (29 loc) · 956 Bytes
/
test2.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
name: test2
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm ci
- name: Build with ncc
run: npx @vercel/ncc build index.js -o dist
- name: Create new branch and commit changes
id: create_branch
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
BRANCH_NAME=automated-build-$(date +'%Y%m%d%H%M%S')
git checkout -b $BRANCH_NAME
git add dist/index.js
git diff --quiet && git diff --staged --quiet || git commit -m "Automated build"
git push
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: Automated build
body: This is an automated build.
branch: ${{ env.BRANCH_NAME }}
base: master