From 77f89beb8a02f6db0a742f5ec8b8ea04ceef5a71 Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 29 Aug 2024 08:59:27 +0200 Subject: [PATCH] chore: update workflows --- .github/workflows/check.yaml | 3 +++ .github/workflows/scheduled.yaml | 34 +++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 355d82f..9ab24d2 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -31,6 +31,9 @@ jobs: uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main secrets: REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} + with: + additional-env-vars: | + NOT_CRAN=true linter: if: github.event_name != 'push' name: SuperLinter πŸ¦Έβ€β™€οΈ diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index d0cc504..3259911 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -1,13 +1,30 @@ --- -name: On-demand πŸ§‘β€πŸ”¬ +name: Scheduled πŸ•°οΈ on: schedule: - cron: '45 3 * * 0' workflow_dispatch: + inputs: + chosen-workflow: + description: | + Select which workflow you'd like to run + required: true + type: choice + default: rhub + options: + - rhub + - dependency-test + - branch-cleanup + - revdepcheck jobs: dependency-test: + if: > + github.event_name == 'schedule' || ( + github.event_name == 'workflow_dispatch' && + inputs.chosen-workflow == 'dependency-test' + ) strategy: fail-fast: false matrix: @@ -22,13 +39,28 @@ jobs: additional-env-vars: | PKG_SYSREQS_DRY_RUN=true branch-cleanup: + if: > + github.event_name == 'schedule' || ( + github.event_name == 'workflow_dispatch' && + inputs.chosen-workflow == 'branch-cleanup' + ) name: Branch Cleanup 🧹 uses: insightsengineering/r.pkg.template/.github/workflows/branch-cleanup.yaml@main secrets: REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} revdepcheck: + if: > + github.event_name == 'schedule' || ( + github.event_name == 'workflow_dispatch' && + inputs.chosen-workflow == 'revdepcheck' + ) name: revdepcheck ↩️ uses: insightsengineering/r.pkg.template/.github/workflows/revdepcheck.yaml@main rhub: + if: > + github.event_name == 'schedule' || ( + github.event_name == 'workflow_dispatch' && + inputs.chosen-workflow == 'rhub' + ) name: R-hub 🌐 uses: insightsengineering/r.pkg.template/.github/workflows/rhub.yaml@main