Skip to content

Commit

Permalink
add callable
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicfraser committed Jan 23, 2024
1 parent 3798d7e commit e803fda
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/callable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
on:
workflow_call:

jobs:
callable:
runs-on: ubuntu-latest
steps:
- name: Callable Step 1
run: echo "called"
30 changes: 15 additions & 15 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ env:
IS_NAMED_BRANCH: ${{ github.ref == 'refs/heads/test_changed_files_action' }}

jobs:
call-workflow:
uses: ./.github/workflows/callable.yml

one:
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: []
runs-on: ubuntu-latest
steps:
- name: Step 1
id: step-one
run: exit -1
# - name: Step 1
# id: step-one
# run: exit -1

- name: Print hello
if: steps.step-one.result == 'success'
run: echo "hello"

# - name: Step 1
# id: changed-files
# run: exit -1

# - name: No files in matcher have been modified
# if: steps.changed-files.outputs.any_modified != 'true'
# run: echo "any_modified != 'true'"
Expand All @@ -39,14 +39,14 @@ jobs:
# echo "One or more test file(s) has changed."
# echo "List all the files that have changed: ${{ steps.changed-files.outputs.all_modified_files }}"

two:
# if: ${{ always() && !failure() && !cancelled() }}
if: ${{ always() && !failure() }}
needs: [one]
runs-on: ubuntu-latest
steps:
- name: Runs
run: echo "runs"
# two:
# # if: ${{ always() && !failure() && !cancelled() }}
# if: ${{ always() && !failure() }}
# needs: [one]
# runs-on: ubuntu-latest
# steps:
# - name: Runs
# run: echo "runs"



0 comments on commit e803fda

Please sign in to comment.