Skip to content

Commit

Permalink
Optimizing workflow reusability
Browse files Browse the repository at this point in the history
  • Loading branch information
vmpay committed Jun 17, 2024
1 parent 6e7149d commit 39b951e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:

# Reusable workflow call
workflow_call:
secrets:
CLIENT_ID:
required: true
CLIENT_SECRET:
required: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ on:
workflow_dispatch:

jobs:
# call-workflow:
# uses: vmpay/battle_net_dart/.github/workflows/main.yml@feature/cn_region_depr
call-workflow:
uses: vmpay/battle_net_dart/.github/workflows/main.yml@feature/cn_region_depr
secrets: inherit

post-call:
runs-on: ubuntu-latest
# needs: call-workflow
steps:
- name: Post call
run: echo "post-call run"
post-call:
runs-on: ubuntu-latest
needs: call-workflow
steps:
- name: Post call
run: echo "post-call run"

0 comments on commit 39b951e

Please sign in to comment.