From efb4b17c02499db3536cdf4d8a312654435cd820 Mon Sep 17 00:00:00 2001 From: egillax Date: Thu, 1 Aug 2024 12:46:41 +0200 Subject: [PATCH] fix version numbers, add tests of containers before publishing, disable arm64 to test new workflow quicker --- .github/workflows/release_docker.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_docker.yaml b/.github/workflows/release_docker.yaml index 518c231..d52bf4a 100644 --- a/.github/workflows/release_docker.yaml +++ b/.github/workflows/release_docker.yaml @@ -7,7 +7,7 @@ # - DOCKER_HUB_ACCESS_TOKEN # - GITHUBPAT - The github account to use for downloading CRAN dependencies. # Needed to avoid "API rate limit exceeded" from github. -name: Release Docker +name: release docker on: push: @@ -27,7 +27,7 @@ jobs: matrix: config: - { runs_on: "ubuntu-latest", arch: "amd64"} - - { runs_on: "ubuntu-latest", arch: "arm64"} + # - { runs_on: "ubuntu-latest", arch: "arm64"} steps: - name: Delete huge unnecessary tools folder run: rm -rf /opt/hostedtoolcache @@ -100,11 +100,30 @@ jobs: path: /tmp/digests/* if-no-files-found: error retention-days: 1 + test: + name: Run R CMD check with containers + runs-on: ubuntu-latest + needs: build + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Download digests + uses: actions/download-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests + + - name: Run R CMD check + run: | + digest=$(ls /tmp/digests) + docker run --rm -v $(pwd):/workspace -w /workspace ${{ env.DOCKER_IMAGE }}@sha256:$digest R CMD check . merge: runs-on: ubuntu-latest needs: - build + - test steps: - name: Download digests uses: actions/download-artifact@v4 @@ -121,6 +140,9 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.DOCKER_IMAGE }} + tags: | + type=semver,pattern={{version}} + - name: Login to DockerHub uses: docker/login-action@v3