diff --git a/.github/workflows/hello-world-composite.yml b/.github/workflows/hello-world-composite.yml index 989d1f8..e27ce36 100644 --- a/.github/workflows/hello-world-composite.yml +++ b/.github/workflows/hello-world-composite.yml @@ -1,7 +1,9 @@ name: 05-2. Hello World Composite -on: - [workflow_dispatch] +on: + pull_request: + branches: [main] + workflow_dispatch: jobs: hello_world_job1: @@ -14,3 +16,14 @@ jobs: who-to-greet: 'Hello from GH ABCs' - run: echo random-number ${{ steps.hello-world.outputs.random-number }} shell: bash + hello_world_job2: + runs-on: ubuntu-latest + name: A job2 to say hello + steps: + - uses: actions/checkout@v4 + - id: hello-world + uses: ./.github/actions/hello-world-composite-action + with: + who-to-greet: 'Mona the Octocat from composite action' + - run: echo random-number from composite action ${{ steps.hello-world.outputs.random-number }} + shell: bash