From b2f4deb30a39c4f4490dc4f1c1efd7f69c596bf0 Mon Sep 17 00:00:00 2001 From: Robin Vedsted Overgaard Date: Sun, 30 Jun 2024 16:55:45 +0200 Subject: [PATCH] feat: added notify osaawebsite workflow --- .github/workflows/notify-parent.yml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/notify-parent.yml diff --git a/.github/workflows/notify-parent.yml b/.github/workflows/notify-parent.yml new file mode 100644 index 0000000..48c8a3d --- /dev/null +++ b/.github/workflows/notify-parent.yml @@ -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' + }) \ No newline at end of file