From 598dd0bf55eb75beec9d6cafae2c8265b3da617f Mon Sep 17 00:00:00 2001 From: Mdumisi Kelvin Letsie Date: Wed, 6 Mar 2024 11:47:33 +0200 Subject: [PATCH] Updated main.yml file --- .github/workflows/build.yml | 2 +- .github/workflows/main.yml | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3911693a9..de569cd5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle -name: Java CI with Gradle +name: Java Gradle Build on: push: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0827bfcb0..f193573c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,17 +13,22 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: + my_first_job: + name: Checkout + # This workflow contains a single job called "Checkout" # The type of runner that the job will run on runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - name: My First step - - uses: ./.github/workflows/build.yml - name: Call build pipeline to build Java app + name: Checkout repository - \ No newline at end of file +# This job calls the build pipeline from local workflows directory + my_second_job: + needs: my_first_job + name: Build call + runs-on: ubuntu-latest + steps: + # if: ${{ success() }} + - uses: ./.github/workflows/build.yml \ No newline at end of file