From 9dd99d64961117605da3e9999c73dfb0bda3bbee Mon Sep 17 00:00:00 2001 From: Sander Devisscher Date: Fri, 23 Aug 2024 16:32:43 +0200 Subject: [PATCH 1/3] fix #74 attempt 1 --- .../workflows/trigger_build_pkgdown_site.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/trigger_build_pkgdown_site.yaml b/.github/workflows/trigger_build_pkgdown_site.yaml index 6ee50b7..8610620 100644 --- a/.github/workflows/trigger_build_pkgdown_site.yaml +++ b/.github/workflows/trigger_build_pkgdown_site.yaml @@ -14,15 +14,11 @@ jobs: uses: actions/github-script@v6 with: script: | - const { exec } = require('child_process'); - exec('gh workflow run "Build pkgdown site"', (error, stdout, stderr) => { - if (error) { - console.error(`Error: ${error.message}`); - return; - } - if (stderr) { - console.error(`Stderr: ${stderr}`); - return; - } - console.log(`Stdout: ${stdout}`); + const workflow_id = "Build pkgdown site"; // The name of the workflow to trigger + const response = await github.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id, + ref: context.ref, // The branch or tag to run the workflow on }); + console.log(`Triggered workflow: ${response.data.message}`); From 171bccb5d857a7b66fc625d76d1dd7567cbd2e5a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 23 Aug 2024 14:37:13 +0000 Subject: [PATCH 2/3] Increment version [skip ci] --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index fac7d98..4faabaf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: fistools Title: Tools & data used for wildlife management & invasive species in Flanders -Version: 1.2.3 +Version: 1.2.4 Authors@R: c( person(given = "Sander", middle = "", family = "Devisscher", "sander.devisscher@inbo.be", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2015-5731")), From 53dd171707e7373f49f79e1459a4fd537a1a81e4 Mon Sep 17 00:00:00 2001 From: Sander Devisscher Date: Fri, 23 Aug 2024 16:39:05 +0200 Subject: [PATCH 3/3] add workflow_dispatch #74 --- .github/workflows/trigger_build_pkgdown_site.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/trigger_build_pkgdown_site.yaml b/.github/workflows/trigger_build_pkgdown_site.yaml index 8610620..e9d35ca 100644 --- a/.github/workflows/trigger_build_pkgdown_site.yaml +++ b/.github/workflows/trigger_build_pkgdown_site.yaml @@ -5,6 +5,7 @@ on: workflows: ["Increment version"] # Ensure this matches the name in increment_version.yaml types: - completed + workflow_dispatch: jobs: trigger-build: