-
Notifications
You must be signed in to change notification settings - Fork 49
26 lines (24 loc) · 1.44 KB
/
trigger_submodule_update_main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# This workflow is re-used by the 'trigger_submodule_update_reuse.yml' workflow
# in eg. 'brightway2-data'.
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
# This workflow triggers the workflow 'update_submodules.yml' in the 'brightway-documentation' repository.
name: Create Workflow Dispatch (Trigger Submodule Update)
on:
workflow_call: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_call
workflow_dispatch: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Generate Token from GitHub App # https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow#authenticating-with-a-github-app
id: generate_token
uses: tibdex/github-app-token@v2.1.0 # https://github.com/tibdex/github-app-token
with:
app_id: ${{ secrets.DOCUMENTATION_WORKFLOW_APP_ID }}
private_key: ${{ secrets.DOCUMENTATION_WORKFLOW_PRIVATE_KEY }}
- name: Trigger Workflow # https://docs.github.com/en/actions/using-workflows/using-github-cli-in-workflows
id: trigger_workflow
run: |
gh workflow run update_submodules.yml -R brightway-lca/brightway-documentation
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}