Skip to content

Commit

Permalink
CI: Replace workflow with dispatch event to other repo
Browse files Browse the repository at this point in the history
Saves the workflow file from being duplicated across two repositories.
  • Loading branch information
lah7 committed Dec 6, 2024
1 parent c4591f0 commit a4795c9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 45 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish to Web

on:
push:
branches:
- master
workflow_dispatch:

jobs:
dispatch:
name: Trigger Deployment
permissions:
actions: write
runs-on: ubuntu-latest
steps:
- name: Dispatch guide.ubuntu-mate.org workflow
if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/ubuntu-mate-guide' }}
run: |
curl --fail -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/ubuntu-mate/guide.ubuntu-mate.org/actions/workflows/main.yml/dispatches \
-d '{"ref":"master","inputs":{}}'
echo "View progress on the guide.ubuntu-mate.org repository:"
echo "https://github.com/ubuntu-mate/guide.ubuntu-mate.org/actions/workflows/main.yml"
45 changes: 0 additions & 45 deletions .github/workflows/publish-web.yml

This file was deleted.

0 comments on commit a4795c9

Please sign in to comment.