ci: use rocker container with shell git checkout
R-CMD-check / R CMD check (push) Failing after 2m13s
R-CMD-check / R CMD check (push) Failing after 2m13s
Replace actions/checkout@v4 (JS action, requires Node.js) with plain git commands using the auto-injected gitea.token for auth. This lets the workflow run entirely inside rocker/r-ver:4.4 without any Node.js dependency.
This commit is contained in:
+14
-12
@@ -10,24 +10,26 @@ jobs:
|
|||||||
check:
|
check:
|
||||||
name: R CMD check
|
name: R CMD check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container: rocker/r-ver:4.4
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
# Plain git checkout — no Node.js required, works in any container.
|
||||||
|
# gitea.token is automatically injected by the runner for auth.
|
||||||
- name: Set up R
|
- name: Check out code
|
||||||
|
env:
|
||||||
|
REPO_TOKEN: ${{ gitea.token }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -qq
|
apt-get update -qq && apt-get install -y --no-install-recommends git
|
||||||
sudo apt-get install -y --no-install-recommends software-properties-common dirmngr
|
git config --global --add safe.directory "$PWD"
|
||||||
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc \
|
git init
|
||||||
| sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
|
git remote add origin \
|
||||||
sudo add-apt-repository \
|
"https://oauth2:${REPO_TOKEN}@gitea.civilytics.org/${{ gitea.repository }}.git"
|
||||||
"deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
|
git fetch --depth=1 origin "${{ gitea.sha }}"
|
||||||
sudo apt-get update -qq
|
git checkout FETCH_HEAD
|
||||||
sudo apt-get install -y --no-install-recommends r-base r-base-dev
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
|
|||||||
Reference in New Issue
Block a user