Skip to content

Commit

Permalink
Calling another workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cdivitotawela committed Jun 4, 2024
1 parent 77455d5 commit 125070a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/called-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: called workflow

# https://docs.github.com/en/actions/using-workflows/reusing-workflows

on:
workflow_call:
inputs:
tag:
required: true
type: string

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Test conatiner
run: echo "Run tests for container with tag ${{ inputs.tag }}"
10 changes: 9 additions & 1 deletion .github/workflows/calling-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

jobs:
call:
generate-tag:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.generate-image-tag.outputs.tag }}
Expand All @@ -16,3 +16,11 @@ jobs:

- name: Display output
run: echo ${{ steps.generate-image-tag.outputs.tag }}

call:
uses: cdivitotawela/github-workflow-examples/.github/workflows/called-workflow.yaml
with:
tag: ${{ needs.generate-tag.outputs.tag }}
needs: ["generate-tag"]


0 comments on commit 125070a

Please sign in to comment.