From 0a53d045111a888b36d41ceffddb0568da045a16 Mon Sep 17 00:00:00 2001 From: Antonin Stefanutti Date: Mon, 13 Feb 2023 18:05:22 +0100 Subject: [PATCH] ci: Trigger CI workflow after the snapshots update --- .github/workflows/ci.yml | 1 + .github/workflows/update-snapshots.yml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66fa39d..f83683d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ on: - '**.adoc' - '**.md' - 'LICENSE' + repository_dispatch: schedule: - cron: '0 12 * * *' diff --git a/.github/workflows/update-snapshots.yml b/.github/workflows/update-snapshots.yml index d494d74..f6e7294 100644 --- a/.github/workflows/update-snapshots.yml +++ b/.github/workflows/update-snapshots.yml @@ -1,4 +1,4 @@ -name: Update snapshots +name: Update Snapshots on: workflow_dispatch: @@ -21,3 +21,14 @@ jobs: git add . git commit -m "test: update snapshot PDFs" git push + - name: Trigger CI Workflow + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'ci.yml', + ref: context.ref, + })