Skip to content

Commit

Permalink
ci: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kilee1230 committed Dec 23, 2023
1 parent 035d029 commit 1b403fb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Node CI

on: [push]


repository:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -11,14 +16,15 @@ jobs:
node-version: [18.x]

steps:
- name: Check if it's a push event
if: github.event_name == 'create'
- name: Check if it's a repository creation event
run: |
echo "This is a create new repo event, will skip current workflow"
exit 0
if [ "${{ github.event_name }}" == 'create' ]; then
echo "Stopping job because it's a repository creation event."
exit 0 # This will exit the script and stop the job
fi
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
Expand Down

0 comments on commit 1b403fb

Please sign in to comment.