Skip to content

Commit

Permalink
push to main;
Browse files Browse the repository at this point in the history
  • Loading branch information
Muneeb147 committed Oct 22, 2024
1 parent c50c068 commit fd06863
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 49 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,28 @@ on:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Run Build
run: echo "Building the project"
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Build Application
run: echo "Building the application"

final_job:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Final Job
run: |
echo "Determining which workflow triggered the Final Job..."
node source/dump-ci-stats-to-gcp-logs.js "Build Job"
15 changes: 0 additions & 15 deletions .github/workflows/deploy.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/final_check.yml

This file was deleted.

32 changes: 25 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,28 @@ on:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Run Tests
run: echo "Running tests"
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Test Application
run: echo "Testing the application"

final_job:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Final Job
run: |
echo "Determining which workflow triggered the Final Job..."
node source/dump-ci-stats-to-gcp-logs.js "Test Job"
11 changes: 11 additions & 0 deletions source/dump-ci-stats-to-gcp-logs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Access the command line arguments passed to the script
const inputParam = process.argv[2]; // process.argv[0] is 'node', argv[1] is the script path

// Check if an argument was provided
if (!inputParam) {
console.error("No parameter provided! Please pass a parameter as an argument.");
process.exit(1); // Exit with a non-zero code to indicate an error
}

// Log the provided parameter to the console
console.log(`The provided parameter is: ${inputParam}`);

0 comments on commit fd06863

Please sign in to comment.