Skip to content

Commit

Permalink
setup-r-deps: replace github-token param with GITHUB_PAT env var (#…
Browse files Browse the repository at this point in the history
…262)

Fix the issue when private repos cannot be accessed:
https://github.com/insightsengineering/citril/actions/runs/11717635984/job/32642879518?pr=464

- `github-token` was not used and removed in a companion PR:
insightsengineering/setup-r-dependencies#17
- set up `GITHUB_ENV` on setup-r-deps use

---------

Signed-off-by: Pawel Rucki <12943682+pawelru@users.noreply.github.com>
  • Loading branch information
pawelru authored Nov 7, 2024
1 parent 7efc90c commit d45f912
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/bioccheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ jobs:
if: >-
inputs.deps-installation-method == 'setup-r-dependencies'
uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
github-token: ${{ steps.github-token.outputs.token }}
repository-path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}

- name: Run BiocCheck ☣️
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-check-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,10 @@ jobs:
env.deps_installation_method == 'setup-r-dependencies'
&& inputs.install-deps-from-package-repositories == ''
uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
github-token: ${{ steps.github-token.outputs.token }}
repository-path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}
skip-desc-branch: ${{ inputs.skip-desc-branch }}
skip-desc-dev: ${{ inputs.skip-desc-dev }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ jobs:
if: >-
inputs.deps-installation-method == 'setup-r-dependencies'
uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
github-token: ${{ steps.github-token.outputs.token }}
repository-path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}

- name: Install R package 🚧
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/revdepcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ jobs:

- name: Install dependencies
uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
skip-desc-branch: true
github-token: ${{ steps.github-token.outputs.token }}

- name: revdepcheck 🔄
id: revdepcheck
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ jobs:
job-config: ${{ matrix.config.job-config }}

- uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
skip-install: true
github-token: ${{ steps.github-token.outputs.token }}
restore-description: false
install-quarto: "false"

Expand Down Expand Up @@ -149,10 +150,11 @@ jobs:
job-config: ${{ matrix.config.job-config }}

- uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
skip-install: true
github-token: ${{ steps.github-token.outputs.token }}
restore-description: false
install-quarto: "false"

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/roxygen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ jobs:
if: >-
env.deps_installation_method == 'setup-r-dependencies'
uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
github-token: ${{ steps.github-token.outputs.token }}
repository-path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}

- name: Generate man pages 📄
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,10 @@ jobs:
if: >-
inputs.deps-installation-method == 'setup-r-dependencies'
uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
github-token: ${{ steps.github-token.outputs.token }}
repository-path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}

- name: Install R package 🚧
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ jobs:
if: >-
inputs.deps-installation-method == 'setup-r-dependencies'
uses: insightsengineering/setup-r-dependencies@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
with:
lookup-refs: ${{ inputs.lookup-refs }}
github-token: ${{ steps.github-token.outputs.token }}
repository-path: ${{ env.package_subdirectory }}

- name: Build report 🏗
Expand Down

0 comments on commit d45f912

Please sign in to comment.