From 1eae61f7bd1755e2d0c371eeb1636cc0ce69b4a8 Mon Sep 17 00:00:00 2001 From: pratikunterwegs Date: Thu, 6 Jun 2024 11:14:14 +0100 Subject: [PATCH] Copy GHA workflows from {packagetemplate} --- .github/workflows/dependency-change.yaml | 9 ++++- .github/workflows/lint-changed-files.yaml | 1 + .github/workflows/pkgdown.yaml | 2 +- .github/workflows/update-copyright-year.yml | 37 +++++++++++++++++++++ 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/update-copyright-year.yml diff --git a/.github/workflows/dependency-change.yaml b/.github/workflows/dependency-change.yaml index 1250c8a5..ef26e664 100644 --- a/.github/workflows/dependency-change.yaml +++ b/.github/workflows/dependency-change.yaml @@ -52,6 +52,12 @@ jobs: message("Dependencies have changed! Analyzing...") + if (nrow(deps_added) > 0) { + nudge <- "Reach out on slack (`#code-review` or `#help` channels) to double check if there are base R alternatives to the new dependencies.\n" + } else { + nudge <- "" + } + msg <- glue::glue( .sep = "\n", "This pull request:", @@ -60,7 +66,8 @@ jobs: "- Removes {nrow(deps_removed)} existing dependencies (direct and indirect)", "- Removes {length(unique(deps_removed$sysreqs))} existing system dependencies", "", - "(Note that results may be inacurrate if you branched from an outdated version of the target branch.)" + nudge, + "(Note that results may be inaccurate if you branched from an outdated version of the target branch.)" ) message("Posting results as a pull request comment.") diff --git a/.github/workflows/lint-changed-files.yaml b/.github/workflows/lint-changed-files.yaml index f9aa5c54..cf5c34b6 100644 --- a/.github/workflows/lint-changed-files.yaml +++ b/.github/workflows/lint-changed-files.yaml @@ -34,6 +34,7 @@ jobs: any::gh any::lintr any::purrr + any::cyclocomp epiverse-trace/etdev needs: check diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index bd6afbcd..fc978437 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -78,7 +78,7 @@ jobs: - name: Deploy to GitHub pages 🚀 if: github.event_name != 'merge_group' && github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.5.0 + uses: JamesIves/github-pages-deploy-action@v4.6.1 with: # We clean on releases because we want to remove old vignettes, # figures, etc. that have been deleted from the `main` branch. diff --git a/.github/workflows/update-copyright-year.yml b/.github/workflows/update-copyright-year.yml new file mode 100644 index 00000000..b4633b3c --- /dev/null +++ b/.github/workflows/update-copyright-year.yml @@ -0,0 +1,37 @@ +name: Update copyright year(s) in license file + +on: + workflow_dispatch: + schedule: + - cron: '0 3 1 1 *' + +permissions: + contents: write + pull-requests: write + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: FantasticFiasco/action-update-license-year@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + path: | + LICENSE.md + prBody: > + This PR updates the copyright license for this new year! If you're reading this while you're celebrating, enjoy! Don't worry about this one :blush: + + ![Happy new year!](https://media.giphy.com/media/HyDfNCZlTn5iU/giphy.gif?cid=ecf05e4777yl7dbo1xfha6bx1z5lrl13uq7biv6rs9dqsyoh&ep=v1_gifs_search&rid=giphy.gif&ct=g) + - uses: FantasticFiasco/action-update-license-year@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + path: | + LICENSE + prBody: > + This PR updates the copyright license for this new year! If you're reading this while you're celebrating, enjoy! Don't worry about this one :blush: + + ![Happy new year!](https://media.giphy.com/media/HyDfNCZlTn5iU/giphy.gif?cid=ecf05e4777yl7dbo1xfha6bx1z5lrl13uq7biv6rs9dqsyoh&ep=v1_gifs_search&rid=giphy.gif&ct=g) + transform: (?<=YEAR:\s)(?\d{4})?-?(\d{4})?