From cf8bc645bf20216ef0992a14aab31ebdd2faf444 Mon Sep 17 00:00:00 2001 From: Marcel Ramos Date: Wed, 22 Nov 2023 14:55:35 -0500 Subject: [PATCH] Use binary installations (#40) - add CRAN binaries env var from RSPM - update actions versions --- .github/workflows/basic_checks.yaml | 42 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/basic_checks.yaml b/.github/workflows/basic_checks.yaml index 99df69b..f914f66 100644 --- a/.github/workflows/basic_checks.yaml +++ b/.github/workflows/basic_checks.yaml @@ -9,11 +9,15 @@ jobs: r-build-and-check: runs-on: ubuntu-latest container: bioconductor/bioconductor_docker:devel + env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + R_REMOTES_NO_ERRORS_FROM_WARNINGS: TRUE GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + CRAN: https://packagemanager.posit.co/cran/__linux__/jammy/latest + steps: - - uses: actions/checkout@v2 + - name: Checkout Repository + uses: actions/checkout@v3 - name: Query dependencies and update old packages run: | @@ -23,7 +27,7 @@ jobs: - name: Cache R packages if: runner.os != 'Windows' - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: /usr/local/lib/R/site-library key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ hashFiles('.github/depends.Rds') }} @@ -49,9 +53,8 @@ jobs: - name: Check env: _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "warning", check_dir = "check") + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check") shell: Rscript {0} - - name: Build pkgdown run: | @@ -64,11 +67,12 @@ jobs: apt-get -y install rsync - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages # The branch the action should deploy to. FOLDER: docs # The folder the action should deploy. + docker-build-and-push: #needs: r-build-and-check runs-on: ubuntu-latest @@ -80,9 +84,9 @@ jobs: id-token: write steps: - - name: Checkout repository - uses: actions/checkout@v2 - + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Set Environment Variables run: | REPO_LOWER="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" @@ -91,30 +95,25 @@ jobs: echo "GIT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV echo "REGISTRY=${REGISTRY}" >> $GITHUB_ENV echo "IMAGE=${REGISTRY}/${REPO_LOWER}" >> $GITHUB_ENV - + - name: Show environment run: | env - # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer - name: Install cosign if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@1e95c1de343b5b0c23352d6417ee3e48d5bcd422 - with: - cosign-release: 'v1.4.0' + uses: sigstore/cosign-installer@v3 - - # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx - uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf + uses: docker/setup-buildx-action@v3 # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -124,7 +123,7 @@ jobs: # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v5 with: images: ${{ env.IMAGE }} @@ -132,11 +131,10 @@ jobs: # https://github.com/docker/build-push-action - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }} tags: | ${{ env.IMAGE }}:latest ${{ env.IMAGE }}:${{ env.GIT_SHA }} -