Skip to content

Commit

Permalink
common4
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarGi committed Nov 23, 2023
1 parent 1ac54d8 commit bbc442c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
push:
branches:
- main
schedule:
- cron: "*/6 * * * *"

jobs:
main:
uses: ./.github/workflows/shared_steps.yml
with:
branch: main
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Main Workflow
name: Release Workflow

on:
push:
branches:
- main
schedule:
- cron: "*/6 * * * *"

jobs:
main:
try_cron:
uses: ./.github/workflows/shared_steps.yml
with:
branch: try_cron
19 changes: 16 additions & 3 deletions .github/workflows/shared_steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,32 @@ name: Shared Steps

on:
workflow_call:
inputs:
branch:
type: string

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
- name: checkout
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch }}

- name: Get branch name
run: |
echo "Branch name: ${{ inputs.branch }}"
- name: Set up Node.js
- name: Install node required
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Install dependencies
run: npm install
run: npm ci

- name: run hello.js
run: |
node ./hello.js

0 comments on commit bbc442c

Please sign in to comment.