Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunpat authored Aug 5, 2023
1 parent 3387568 commit 77aa259
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Validate Schedule CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x' # You can specify the desired Node.js version here

- name: Install dependencies
run: npm install

- name: Run index.js
id: run-node
run: node index.js || echo "Error"

- name: Check for output
run: |
if [ -z "${{ steps.run-node.outputs.stdout }}" ]; then
echo "No output. Success!"
else
echo "Error: ${{ steps.run-node.outputs.stdout }}"
exit 1
fi

0 comments on commit 77aa259

Please sign in to comment.