Skip to content

Commit

Permalink
feat: added notify osaawebsite workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinOvergaard committed Jun 30, 2024
1 parent b4a4b42 commit b2f4deb
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/notify-parent.yml
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'
})

0 comments on commit b2f4deb

Please sign in to comment.