Skip to content

Commit 553c0fb

Browse files
committed
test
1 parent 5fac16e commit 553c0fb

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.github/workflows/automate_ncc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
BRANCH_NAME=automated-build-$(date +'%Y%m%d%H%M%S')
2525
git checkout -b $BRANCH_NAME
2626
git add dist/index.js
27-
git commit -m "Automated build"
27+
git diff --quiet && git diff --staged --quiet || git commit -m "Automated build"
2828
git push origin $BRANCH_NAME
2929
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
3030

.github/workflows/test2.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: test2
2+
3+
on: [push]
4+
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Install dependencies
14+
run: npm ci
15+
16+
- name: Build with ncc
17+
run: npx @vercel/ncc build index.js -o dist
18+
19+
- name: Create new branch and commit changes
20+
id: create_branch
21+
run: |
22+
git config --global user.email "actions@github.com"
23+
git config --global user.name "GitHub Action"
24+
BRANCH_NAME=automated-build-$(date +'%Y%m%d%H%M%S')
25+
git checkout -b $BRANCH_NAME
26+
git add dist/index.js
27+
git diff --quiet && git diff --staged --quiet || git commit -m "Automated build"
28+
git push origin $BRANCH_NAME
29+
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
30+
- name: Create Pull Request
31+
uses: peter-evans/create-pull-request@v6
32+
with:
33+
title: Automated build
34+
body: This is an automated build.
35+
branch: ${{ env.BRANCH_NAME }}
36+
base: master

0 commit comments

Comments
 (0)