Skip to content

Commit cf8bc64

Browse files
authored
Use binary installations (#40)
- add CRAN binaries env var from RSPM - update actions versions
1 parent 0e6abc4 commit cf8bc64

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

.github/workflows/basic_checks.yaml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ jobs:
99
r-build-and-check:
1010
runs-on: ubuntu-latest
1111
container: bioconductor/bioconductor_docker:devel
12+
1213
env:
13-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
14+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: TRUE
1415
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
CRAN: https://packagemanager.posit.co/cran/__linux__/jammy/latest
17+
1518
steps:
16-
- uses: actions/checkout@v2
19+
- name: Checkout Repository
20+
uses: actions/checkout@v3
1721

1822
- name: Query dependencies and update old packages
1923
run: |
@@ -23,7 +27,7 @@ jobs:
2327

2428
- name: Cache R packages
2529
if: runner.os != 'Windows'
26-
uses: actions/cache@v1
30+
uses: actions/cache@v3
2731
with:
2832
path: /usr/local/lib/R/site-library
2933
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ hashFiles('.github/depends.Rds') }}
@@ -49,9 +53,8 @@ jobs:
4953
- name: Check
5054
env:
5155
_R_CHECK_CRAN_INCOMING_REMOTE_: false
52-
run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "warning", check_dir = "check")
56+
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
5357
shell: Rscript {0}
54-
5558

5659
- name: Build pkgdown
5760
run: |
@@ -64,11 +67,12 @@ jobs:
6467
apt-get -y install rsync
6568
6669
- name: Deploy 🚀
67-
uses: JamesIves/github-pages-deploy-action@releases/v4
70+
uses: JamesIves/github-pages-deploy-action@v4
6871
with:
69-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
7073
BRANCH: gh-pages # The branch the action should deploy to.
7174
FOLDER: docs # The folder the action should deploy.
75+
7276
docker-build-and-push:
7377
#needs: r-build-and-check
7478
runs-on: ubuntu-latest
@@ -80,9 +84,9 @@ jobs:
8084
id-token: write
8185

8286
steps:
83-
- name: Checkout repository
84-
uses: actions/checkout@v2
85-
87+
- name: Checkout Repository
88+
uses: actions/checkout@v3
89+
8690
- name: Set Environment Variables
8791
run: |
8892
REPO_LOWER="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
@@ -91,30 +95,25 @@ jobs:
9195
echo "GIT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV
9296
echo "REGISTRY=${REGISTRY}" >> $GITHUB_ENV
9397
echo "IMAGE=${REGISTRY}/${REPO_LOWER}" >> $GITHUB_ENV
94-
98+
9599
- name: Show environment
96100
run: |
97101
env
98102
99-
100103
# Install the cosign tool except on PR
101104
# https://github.com/sigstore/cosign-installer
102105
- name: Install cosign
103106
if: github.event_name != 'pull_request'
104-
uses: sigstore/cosign-installer@1e95c1de343b5b0c23352d6417ee3e48d5bcd422
105-
with:
106-
cosign-release: 'v1.4.0'
107+
uses: sigstore/cosign-installer@v3
107108

108-
109-
# Workaround: https://github.com/docker/build-push-action/issues/461
110109
- name: Setup Docker buildx
111-
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
110+
uses: docker/setup-buildx-action@v3
112111

113112
# Login against a Docker registry except on PR
114113
# https://github.com/docker/login-action
115114
- name: Log into registry ${{ env.REGISTRY }}
116115
if: github.event_name != 'pull_request'
117-
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
116+
uses: docker/login-action@v3
118117
with:
119118
registry: ${{ env.REGISTRY }}
120119
username: ${{ github.actor }}
@@ -124,19 +123,18 @@ jobs:
124123
# https://github.com/docker/metadata-action
125124
- name: Extract Docker metadata
126125
id: meta
127-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
126+
uses: docker/metadata-action@v5
128127
with:
129128
images: ${{ env.IMAGE }}
130129

131130
# Build and push Docker image with Buildx (don't push on PR)
132131
# https://github.com/docker/build-push-action
133132
- name: Build and push Docker image
134133
id: build-and-push
135-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
134+
uses: docker/build-push-action@v5
136135
with:
137136
context: .
138137
push: ${{ github.event_name != 'pull_request' }}
139138
tags: |
140139
${{ env.IMAGE }}:latest
141140
${{ env.IMAGE }}:${{ env.GIT_SHA }}
142-

0 commit comments

Comments
 (0)