-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added notify osaawebsite workflow
- Loading branch information
1 parent
b4a4b42
commit b2f4deb
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: 'Submodule Notify Parent' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
notify: | ||
name: 'Submodule Notify Parent' | ||
runs-on: ubuntu-latest | ||
|
||
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
# required | ||
app-id: ${{ secrets.OSAAWEBSITEBOT_APPID }} | ||
private-key: ${{ secrets.OSAAWEBSITEBOT_PRIVATEKEY }} | ||
token: ${{ steps.app-token.outputs.token }} | ||
|
||
- uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.PAT }} # Fine-grained GitHub PAT that was saved as repository secret | ||
script: | | ||
await github.rest.actions.createworkflowDispatch({ | ||
owner: 'openspaceaarhus', | ||
repo: 'osaawebsite', | ||
workflow_id: 'submodules.yml', | ||
ref: 'master' | ||
}) |