From e4343133b62fd6800cfa1d08b50812e9745793e4 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 10:04:10 +0100 Subject: [PATCH 001/109] Update build-and-publish-image.yml for two images --- .github/workflows/build-and-publish-image.yml | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index 7d0014dc2..7aabc3a4d 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -41,7 +41,17 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - name: Extract version number run: | VER=$(cat VERSION) @@ -50,9 +60,11 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + #registry: ${{ env.REGISTRY }} + #username: ${{ github.actor }} + #password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta From d7f099864c714b276a64be9aa8469e5f4d9da325 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 10:26:36 +0100 Subject: [PATCH 002/109] Update cache --- .github/workflows/build-and-publish-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index 7aabc3a4d..3fe0e1367 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -46,7 +46,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} From 38e53862f6fbdbe3bd781121fc97d5c66134c5af Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 10:36:15 +0100 Subject: [PATCH 003/109] Update build-and-publish-image.yml --- .github/workflows/build-and-publish-image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index 3fe0e1367..ef632af36 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -3,6 +3,7 @@ # separate terms of service, privacy policy, and support # documentation. + name: Build and publish Docker image on: From 69fe2056190aef0284d13d9748630c02f4a08033 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 10:47:22 +0100 Subject: [PATCH 004/109] Update build-and-publish-image.yml --- .github/workflows/build-and-publish-image.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index ef632af36..c3bf93ca6 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -71,7 +71,8 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ github.repository }} + images: ${{ secrets.DOCKERHUB_USERNAME }} + #images: ${{ env.REGISTRY }}/${{ github.repository }} tags: | type=ref,event=branch type=ref,event=pr From 65e41cd95d305c86bb549282caa41cd556a631f6 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 10:57:43 +0100 Subject: [PATCH 005/109] Update registry and added platform tags --- .github/workflows/build-and-publish-image.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index c3bf93ca6..2ea7c7a7f 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -63,6 +63,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ${{ secrets.DOCKERHUB_USERNAME }} #registry: ${{ env.REGISTRY }} #username: ${{ github.actor }} #password: ${{ secrets.GITHUB_TOKEN }} @@ -88,3 +89,6 @@ jobs: build-args: | CONTAINER_VERSION=${{ env.VERSION }} labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64/v8 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache From a7f491e395ccd6e2da1d0505751423ecc94010d7 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 11:02:44 +0100 Subject: [PATCH 006/109] Update build-and-publish-image.yml --- .github/workflows/build-and-publish-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index 2ea7c7a7f..01389d9a9 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -63,8 +63,8 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - registry: ${{ secrets.DOCKERHUB_USERNAME }} - #registry: ${{ env.REGISTRY }} + #registry: ${{ secrets.DOCKERHUB_USERNAME }} + registry: ${{ env.REGISTRY }} #username: ${{ github.actor }} #password: ${{ secrets.GITHUB_TOKEN }} From 70cddd6ff5f9950ef0b46dd5b08ac943032b9553 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 11:04:42 +0100 Subject: [PATCH 007/109] Update build-and-publish-image.yml --- .github/workflows/build-and-publish-image.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index 01389d9a9..9447c0ddd 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -61,10 +61,9 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: + registry: ${{ env.REGISTRY }} username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - #registry: ${{ secrets.DOCKERHUB_USERNAME }} - registry: ${{ env.REGISTRY }} #username: ${{ github.actor }} #password: ${{ secrets.GITHUB_TOKEN }} From c450b56d6cbfcf9e79159152049b90bb0bb19854 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 11:24:23 +0100 Subject: [PATCH 008/109] Update build-and-publish-image.yml --- .github/workflows/build-and-publish-image.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index 9447c0ddd..6956d5d35 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -62,10 +62,8 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - #username: ${{ github.actor }} - #password: ${{ secrets.GITHUB_TOKEN }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta From aed15157d6283d227232c46a2b2bcd870a942002 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 11 Jul 2025 16:08:52 +0100 Subject: [PATCH 009/109] Update build-and-publish-image.yml --- .github/workflows/build-and-publish-image.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index 6956d5d35..6c340e19e 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -69,8 +69,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ secrets.DOCKERHUB_USERNAME }} - #images: ${{ env.REGISTRY }}/${{ github.repository }} + images: ${{ env.REGISTRY }}/${{ github.repository }} tags: | type=ref,event=branch type=ref,event=pr From d068c982e6fba71952169a044270dbc57f3b3efc Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:35:42 +0100 Subject: [PATCH 010/109] Initial reusable flow --- .github/workflows/call_jobs.yml | 24 ++++ .github/workflows/reuse-build-and-publish.yml | 109 ++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 .github/workflows/call_jobs.yml create mode 100644 .github/workflows/reuse-build-and-publish.yml diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml new file mode 100644 index 000000000..b5e00d312 --- /dev/null +++ b/.github/workflows/call_jobs.yml @@ -0,0 +1,24 @@ +name: Call reusable workflows + +on: + pull_request: + branches: + - ["main","devel"] + +jobs: + call-workflow-amd64: + permissions: + contents: read + pull-requests: write + uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml@v1 + with: + config-path: .github/labeler.yml + event_name: ${{ github.event_name }} + pull_request: ${{ github.pull_request.merged }} + repository: ${{ github.event_name }} + version: ${{ github.event_name }} + image_name: ${{ github.repository }} + ref_name: ${{ github.branch }} + actor: ${{ github.actor }} + secrets: + personal_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml new file mode 100644 index 000000000..966260f6c --- /dev/null +++ b/.github/workflows/reuse-build-and-publish.yml @@ -0,0 +1,109 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +#https://github.com/r-devel/r-dev-env/issues/252 + +name: Build and publish Docker image + +env: + REGISTRY: ghcr.io + +on: + workflow_call: + inputs: + event_name: + description: event name + required: true + type: string + pull_request: + description: pull request + required: false + type: string + repository: + description: repository name + required: true + type: string + version: + description: container version + required: true + type: number + image_name: + description: image name + required: true + type: string + ref_name: + description: ref name + required: true + type: string + actor: + description: github actor + required: true + type: string + secrets: + github_token: + required: true + push: + branches: ["main","devel"] + paths: + - '.github/workflows/reuse-build-and-publish.yml' + pull_request: + branches: ["main","devel"] + types: [closed] + paths: + - '.github/workflows/reuse-build-and-publish.yml' + - '.devcontainer/devcontainer.json' + - 'Dockerfile' + - 'reinstall-cmake.sh' + - 'VERSION' + +permissions: + contents: read + packages: write + +jobs: + reuse-build-and-push: + if: | + ${{ inputs.event_name }} == 'workflow_dispatch' || + ${{ inputs.event_name }} == 'push' || + (${{ inputs.event_name }} == 'pull_request' && + ${{ inputs.pull_request }} == true) + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + #- name: Extract version number + # run: | + # VER=$(cat VERSION) + # echo "VERSION=$VER" >> $GITHUB_ENV + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: $REGISTRY + username: ${{ inputs.actor }} + password: ${{ secrets.github_token }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: $REGISTRY/${{ inputs.repository }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern=${{ inputs.version }} + type=sha + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: $REGISTRY/${{ inputs.image_name }}:${{ inputs.ref_name }} + build-args: | + CONTAINER_VERSION=${{ inputs.version }} + labels: ${{ steps.meta.outputs.labels }} From 6a912a29f2a49e0bd8b03d3d24270369afdc6773 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:38:21 +0100 Subject: [PATCH 011/109] Update call_jobs.yml and fix syntax --- .github/workflows/call_jobs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index b5e00d312..746ff1907 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -1,9 +1,9 @@ name: Call reusable workflows on: - pull_request: + push: branches: - - ["main","devel"] + - master jobs: call-workflow-amd64: From 4178cc32e580f1fe955e45ab16063815cdc774d9 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:39:17 +0100 Subject: [PATCH 012/109] Update call_jobs.yml and addd branch --- .github/workflows/call_jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 746ff1907..97e84bd91 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - devel jobs: call-workflow-amd64: From d04a92acce40a4018e53ca5e47b0640b45c045b5 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:40:30 +0100 Subject: [PATCH 013/109] Removed version --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 97e84bd91..bf5d2d3bb 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -11,7 +11,7 @@ jobs: permissions: contents: read pull-requests: write - uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml@v1 + uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml with: config-path: .github/labeler.yml event_name: ${{ github.event_name }} From a231106e4c8c28504e7199940b5c8dba3043d848 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:43:40 +0100 Subject: [PATCH 014/109] Change to gh token --- .github/workflows/reuse-build-and-publish.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 966260f6c..afbbfa756 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -42,15 +42,20 @@ on: required: true type: string secrets: - github_token: + gh_token: required: true push: - branches: ["main","devel"] + branches: + - main + - devel paths: - '.github/workflows/reuse-build-and-publish.yml' pull_request: - branches: ["main","devel"] - types: [closed] + branches: + - main + - devel + types: + - closed paths: - '.github/workflows/reuse-build-and-publish.yml' - '.devcontainer/devcontainer.json' @@ -85,7 +90,7 @@ jobs: with: registry: $REGISTRY username: ${{ inputs.actor }} - password: ${{ secrets.github_token }} + password: ${{ secrets.gh_token }} - name: Extract metadata (tags, labels) for Docker id: meta From b1360ae4d885adc4c6cf7941993c40c5ab5b38ac Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:48:34 +0100 Subject: [PATCH 015/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index afbbfa756..967bf7fb4 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -44,6 +44,10 @@ on: secrets: gh_token: required: true + username: + required: true + password: + required: true push: branches: - main From 190dcf8b1e3fe6fa61bbb42ec5ab50b5213428ce Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:48:55 +0100 Subject: [PATCH 016/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index bf5d2d3bb..d0da75510 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -23,3 +23,5 @@ jobs: actor: ${{ github.actor }} secrets: personal_access_token: ${{ secrets.GITHUB_TOKEN }} + username: ${{ secrets.username }} + password: ${{ secrets.password}} From dc57ccc33a3f454838337198a20bdb55311ae7b4 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:50:40 +0100 Subject: [PATCH 017/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index d0da75510..c9de7bbf3 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -11,7 +11,7 @@ jobs: permissions: contents: read pull-requests: write - uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml + uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml@devel with: config-path: .github/labeler.yml event_name: ${{ github.event_name }} From 0b1ad6453c7d5ba9349d75e70475f54ab47515c3 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:52:45 +0100 Subject: [PATCH 018/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index c9de7bbf3..d0da75510 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -11,7 +11,7 @@ jobs: permissions: contents: read pull-requests: write - uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml@devel + uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml with: config-path: .github/labeler.yml event_name: ${{ github.event_name }} From 56ce47c6748b54ac86c12155896cf02655e34648 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 09:53:58 +0100 Subject: [PATCH 019/109] Added branch --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index d0da75510..c9de7bbf3 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -11,7 +11,7 @@ jobs: permissions: contents: read pull-requests: write - uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml + uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml@devel with: config-path: .github/labeler.yml event_name: ${{ github.event_name }} From e2a20d752d680020f609447b68d5ddf3a4762269 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:04:18 +0100 Subject: [PATCH 020/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index c9de7bbf3..b5591cda8 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -11,7 +11,7 @@ jobs: permissions: contents: read pull-requests: write - uses: r-devel/r-devel/.github/workflows/reuse-build-and-publish.yml@devel + uses: r-devel/.github/workflows/reuse-build-and-publish.yml@devel with: config-path: .github/labeler.yml event_name: ${{ github.event_name }} From 38099d570578ce1964ff8464f4b6e11d2fe63338 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:04:59 +0100 Subject: [PATCH 021/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index b5591cda8..890a6399f 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -11,7 +11,7 @@ jobs: permissions: contents: read pull-requests: write - uses: r-devel/.github/workflows/reuse-build-and-publish.yml@devel + uses: iaine/r-devel/.github/workflows/reuse-build-and-publish.yml@devel with: config-path: .github/labeler.yml event_name: ${{ github.event_name }} From ebcfe0e7ba27d47017afcbb16a3dd0a6e375545c Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:06:50 +0100 Subject: [PATCH 022/109] Fix path --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 890a6399f..6317f5aa3 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -11,7 +11,7 @@ jobs: permissions: contents: read pull-requests: write - uses: iaine/r-devel/.github/workflows/reuse-build-and-publish.yml@devel + uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@devel with: config-path: .github/labeler.yml event_name: ${{ github.event_name }} From ae74c0661cb12ec629058d654c44b500b8a5b459 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:12:59 +0100 Subject: [PATCH 023/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 6317f5aa3..d53573e50 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -21,7 +21,4 @@ jobs: image_name: ${{ github.repository }} ref_name: ${{ github.branch }} actor: ${{ github.actor }} - secrets: - personal_access_token: ${{ secrets.GITHUB_TOKEN }} - username: ${{ secrets.username }} - password: ${{ secrets.password}} + secrets: inherit From bfb32dd6d359de769d0a65c5928b673d38397185 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:14:44 +0100 Subject: [PATCH 024/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 967bf7fb4..82f935e36 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -69,7 +69,7 @@ on: permissions: contents: read - packages: write + packages: none jobs: reuse-build-and-push: From e024c9a14eb2308772baa4e1c1f74a4428edb01c Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:16:39 +0100 Subject: [PATCH 025/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 82f935e36..0b894f381 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -93,7 +93,7 @@ jobs: uses: docker/login-action@v3 with: registry: $REGISTRY - username: ${{ inputs.actor }} + username: ${{ secrets.actor }} password: ${{ secrets.gh_token }} - name: Extract metadata (tags, labels) for Docker From 5bb1553a38a88b0d70d6b05794879a083fae0c50 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:25:23 +0100 Subject: [PATCH 026/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 0b894f381..a12a2def1 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -93,8 +93,8 @@ jobs: uses: docker/login-action@v3 with: registry: $REGISTRY - username: ${{ secrets.actor }} - password: ${{ secrets.gh_token }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta From bc360267c9ccb2c52daf863923ff5bab860fa6a4 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:26:55 +0100 Subject: [PATCH 027/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index a12a2def1..3d9fddc51 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -92,7 +92,7 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: - registry: $REGISTRY + registry: $env.REGISTRY username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} From bb3373219acd3ce8b7617fc8c232724c610d3eed Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:27:48 +0100 Subject: [PATCH 028/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 3d9fddc51..3ea21f9ed 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -92,7 +92,7 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: - registry: $env.REGISTRY + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} From 9a0c245820aa382383bacf0e731f4e9d89ea4e87 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:28:52 +0100 Subject: [PATCH 029/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 3ea21f9ed..b73826c0c 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -112,7 +112,7 @@ jobs: with: context: . push: true - tags: $REGISTRY/${{ inputs.image_name }}:${{ inputs.ref_name }} + tags: ${{ env.REGISTRY }}/${{ inputs.image_name }}:${{ inputs.ref_name }} build-args: | CONTAINER_VERSION=${{ inputs.version }} labels: ${{ steps.meta.outputs.labels }} From 296869c5e024a064475dc378a0c92bd22c93c513 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:31:46 +0100 Subject: [PATCH 030/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index b73826c0c..3a2d61597 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -9,6 +9,7 @@ name: Build and publish Docker image env: REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} on: workflow_call: @@ -112,7 +113,7 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ inputs.image_name }}:${{ inputs.ref_name }} + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} build-args: | CONTAINER_VERSION=${{ inputs.version }} labels: ${{ steps.meta.outputs.labels }} From dd76ce8deccd546f01edc4af18ba66e4f69b4deb Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:40:13 +0100 Subject: [PATCH 031/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 3a2d61597..a03e12554 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -70,7 +70,7 @@ on: permissions: contents: read - packages: none + packages:write jobs: reuse-build-and-push: From 88d43b41970bce6409a2a42e7eb385547e85c5aa Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:41:10 +0100 Subject: [PATCH 032/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index a03e12554..3b79272c1 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -70,7 +70,7 @@ on: permissions: contents: read - packages:write + packages: write jobs: reuse-build-and-push: From 904140bcc4eda86c426d3152c6e25d7bcda7f704 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 10:50:36 +0100 Subject: [PATCH 033/109] version number --- .github/workflows/reuse-build-and-publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 3b79272c1..386f45031 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -85,10 +85,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - #- name: Extract version number - # run: | - # VER=$(cat VERSION) - # echo "VERSION=$VER" >> $GITHUB_ENV + - name: Extract version number + run: | + VER=$(cat VERSION) + echo "VERSION=$VER" >> $GITHUB_ENV - name: Log in to the Container registry uses: docker/login-action@v3 From 9dd190ad25d8868fb0f89c66ccc108fda047560c Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:01:27 +0100 Subject: [PATCH 034/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index d53573e50..6dfacaf3e 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -10,6 +10,7 @@ jobs: call-workflow-amd64: permissions: contents: read + packages: write pull-requests: write uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@devel with: From 9527f69ce4bad0b1fe88841c03aacc7868f1f9d4 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:02:11 +0100 Subject: [PATCH 035/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 6dfacaf3e..716bb5910 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -14,7 +14,6 @@ jobs: pull-requests: write uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@devel with: - config-path: .github/labeler.yml event_name: ${{ github.event_name }} pull_request: ${{ github.pull_request.merged }} repository: ${{ github.event_name }} From be45553c9149c527a7d82a554eb5e9d42092e4c7 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:05:50 +0100 Subject: [PATCH 036/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 716bb5910..f10d1ed03 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -17,7 +17,7 @@ jobs: event_name: ${{ github.event_name }} pull_request: ${{ github.pull_request.merged }} repository: ${{ github.event_name }} - version: ${{ github.event_name }} + #version: ${{ github.event_name }} image_name: ${{ github.repository }} ref_name: ${{ github.branch }} actor: ${{ github.actor }} From 3bbf9cbb757fcc740fdc02223ffe727446d69806 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:07:14 +0100 Subject: [PATCH 037/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index f10d1ed03..7fa1d6edb 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -17,7 +17,7 @@ jobs: event_name: ${{ github.event_name }} pull_request: ${{ github.pull_request.merged }} repository: ${{ github.event_name }} - #version: ${{ github.event_name }} + version: $(cat VERSION) image_name: ${{ github.repository }} ref_name: ${{ github.branch }} actor: ${{ github.actor }} From cae71589f42144f3ff84adb6d337e464e11a0c60 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:07:52 +0100 Subject: [PATCH 038/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 7fa1d6edb..daea65c0d 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -17,7 +17,6 @@ jobs: event_name: ${{ github.event_name }} pull_request: ${{ github.pull_request.merged }} repository: ${{ github.event_name }} - version: $(cat VERSION) image_name: ${{ github.repository }} ref_name: ${{ github.branch }} actor: ${{ github.actor }} From aed9f657bedf64263a18565d0f4f49e5517372af Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:08:22 +0100 Subject: [PATCH 039/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 386f45031..84f229605 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -26,10 +26,6 @@ on: description: repository name required: true type: string - version: - description: container version - required: true - type: number image_name: description: image name required: true From 956907287efdc3e0cecb9eafac54a968600df1f2 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:23:58 +0100 Subject: [PATCH 040/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index daea65c0d..589a2d9b9 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -11,7 +11,6 @@ jobs: permissions: contents: read packages: write - pull-requests: write uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@devel with: event_name: ${{ github.event_name }} From cbb235e06b908b03f93197d4d43161201a3836d5 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:31:49 +0100 Subject: [PATCH 041/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 84f229605..c61c31228 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -38,13 +38,6 @@ on: description: github actor required: true type: string - secrets: - gh_token: - required: true - username: - required: true - password: - required: true push: branches: - main From 5c8400f1521cee343aabb3c2b0ade3d593cd2134 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:37:10 +0100 Subject: [PATCH 042/109] Update workflow name --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index c61c31228..fd4ddc0ce 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -5,7 +5,7 @@ #https://github.com/r-devel/r-dev-env/issues/252 -name: Build and publish Docker image +name: Build and publish amd 64 Docker image env: REGISTRY: ghcr.io From bd527554282d34acf8319f7c5f41c03415fead78 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:37:55 +0100 Subject: [PATCH 043/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index fd4ddc0ce..a169a8481 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -83,7 +83,7 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} + username: ${{ inputs.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker From f4f5b123f0415b674ec605a242da63067bbc74e5 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:39:33 +0100 Subject: [PATCH 044/109] Remove actor --- .github/workflows/reuse-build-and-publish.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index a169a8481..3d1a686a7 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -34,10 +34,6 @@ on: description: ref name required: true type: string - actor: - description: github actor - required: true - type: string push: branches: - main @@ -83,7 +79,7 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} - username: ${{ inputs.actor }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker From a1e77a436adcd153de144abddea2dda0309e0142 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:40:13 +0100 Subject: [PATCH 045/109] Align call inputs with file inputs --- .github/workflows/call_jobs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 589a2d9b9..5666b20fb 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -18,5 +18,4 @@ jobs: repository: ${{ github.event_name }} image_name: ${{ github.repository }} ref_name: ${{ github.branch }} - actor: ${{ github.actor }} secrets: inherit From 9b584745c6089cdb66a420ff948d630e0bd734a2 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Fri, 25 Jul 2025 11:47:16 +0100 Subject: [PATCH 046/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 5666b20fb..11f2f39b0 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -15,7 +15,7 @@ jobs: with: event_name: ${{ github.event_name }} pull_request: ${{ github.pull_request.merged }} - repository: ${{ github.event_name }} + repository: ${{ github.repository }} image_name: ${{ github.repository }} ref_name: ${{ github.branch }} secrets: inherit From 0ad67e74c9757bac73a4b36b8724c5d31c62676a Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 28 Jul 2025 11:16:18 +0100 Subject: [PATCH 047/109] Cleaning up workflows --- .github/workflows/call_jobs.yml | 2 +- .github/workflows/reuse-build-and-publish.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 11f2f39b0..a9fb8306f 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -16,6 +16,6 @@ jobs: event_name: ${{ github.event_name }} pull_request: ${{ github.pull_request.merged }} repository: ${{ github.repository }} - image_name: ${{ github.repository }} ref_name: ${{ github.branch }} + actor: ${{ github.actor }} secrets: inherit diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 3d1a686a7..cd38b6e57 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -26,14 +26,14 @@ on: description: repository name required: true type: string - image_name: - description: image name - required: true - type: string ref_name: description: ref name required: true type: string + actor: + description: actor + required: true + type: string push: branches: - main @@ -79,18 +79,18 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} + username: ${{ inputs.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: - images: $REGISTRY/${{ inputs.repository }} + images: ${{ env.REGISTRY }}/${{ inputs.repository }} tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern=${{ inputs.version }} + type=semver,pattern=${{ $VER }} type=sha - name: Build and push Docker image @@ -98,7 +98,7 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.ref_name }} build-args: | - CONTAINER_VERSION=${{ inputs.version }} + CONTAINER_VERSION=${{ $VER }} labels: ${{ steps.meta.outputs.labels }} From 354128167eb87356274d0d2743c160d82f65bd00 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 28 Jul 2025 11:17:13 +0100 Subject: [PATCH 048/109] Cleaning up workflows --- .github/workflows/reuse-build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index cd38b6e57..ef051d4e9 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -90,7 +90,7 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern=${{ $VER }} + type=semver,pattern=${{ VER }} type=sha - name: Build and push Docker image @@ -100,5 +100,5 @@ jobs: push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.ref_name }} build-args: | - CONTAINER_VERSION=${{ $VER }} + CONTAINER_VERSION=${{ VER }} labels: ${{ steps.meta.outputs.labels }} From 89135e9c86b75ad09be9e7e9c7fbe06b124f392b Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 28 Jul 2025 11:19:11 +0100 Subject: [PATCH 049/109] Cleaning up workflows --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index ef051d4e9..5b1a93a8c 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -100,5 +100,5 @@ jobs: push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.ref_name }} build-args: | - CONTAINER_VERSION=${{ VER }} + CONTAINER_VERSION=${{ env.VERSION }} labels: ${{ steps.meta.outputs.labels }} From 8cf5866a18e085bc097f1d6ea826f3398177a543 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 28 Jul 2025 11:20:00 +0100 Subject: [PATCH 050/109] Cleaning up workflows --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 5b1a93a8c..f139806c5 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -90,7 +90,7 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern=${{ VER }} + type=semver,pattern=${{ env.VERSION }} type=sha - name: Build and push Docker image From ec32dee43b6d2e62e0ba6321bdd6daa1ae16c3e2 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 28 Jul 2025 11:25:09 +0100 Subject: [PATCH 051/109] Cleaning up workflows --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index a9fb8306f..374423c91 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -16,6 +16,6 @@ jobs: event_name: ${{ github.event_name }} pull_request: ${{ github.pull_request.merged }} repository: ${{ github.repository }} - ref_name: ${{ github.branch }} + ref_name: ${{ github.ref_name }} actor: ${{ github.actor }} secrets: inherit From dd156dcdce0d0ba974110ddfd1a1cd3cb4a67854 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 28 Jul 2025 11:42:22 +0100 Subject: [PATCH 052/109] Cleaning up workflows --- .github/workflows/call_jobs.yml | 3 ++- .github/workflows/reuse-build-and-publish.yml | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 374423c91..c1e9245f9 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -15,7 +15,8 @@ jobs: with: event_name: ${{ github.event_name }} pull_request: ${{ github.pull_request.merged }} - repository: ${{ github.repository }} + image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} actor: ${{ github.actor }} + registry: ghcr.io secrets: inherit diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index f139806c5..7b5101bf8 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -7,10 +7,6 @@ name: Build and publish amd 64 Docker image -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - on: workflow_call: inputs: @@ -22,8 +18,8 @@ on: description: pull request required: false type: string - repository: - description: repository name + image_name: + description: image name required: true type: string ref_name: @@ -34,6 +30,10 @@ on: description: actor required: true type: string + registry: + description: registry + required: true + type: string push: branches: - main @@ -78,7 +78,7 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} + registry: ${{ inputs.repository }} username: ${{ inputs.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -86,7 +86,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ inputs.repository }} + images: ${{ inputs.registry }}/${{ inputs.image_name }} tags: | type=ref,event=branch type=ref,event=pr @@ -98,7 +98,7 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.ref_name }} + tags: ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.ref_name }} build-args: | CONTAINER_VERSION=${{ env.VERSION }} labels: ${{ steps.meta.outputs.labels }} From 9983aebc0173161a9d26e383a4a7e69c1381f4a0 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 28 Jul 2025 11:48:20 +0100 Subject: [PATCH 053/109] Cleaning up workflows --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 7b5101bf8..4dca96823 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -79,7 +79,7 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ inputs.repository }} - username: ${{ inputs.actor }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker From a863bec59eae7b69218d2c3e6d86c8020ca3e89d Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 28 Jul 2025 11:51:56 +0100 Subject: [PATCH 054/109] Cleaning up workflows --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 4dca96823..8d3ab4c24 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -78,7 +78,7 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: - registry: ${{ inputs.repository }} + registry: ${{ inputs.registry }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} From 7bd0a7f3f98385292b32d5634fb68a051e11304f Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:30:26 +0100 Subject: [PATCH 055/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 8d3ab4c24..b67b86924 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -3,21 +3,11 @@ # separate terms of service, privacy policy, and support # documentation. -#https://github.com/r-devel/r-dev-env/issues/252 - name: Build and publish amd 64 Docker image on: workflow_call: inputs: - event_name: - description: event name - required: true - type: string - pull_request: - description: pull request - required: false - type: string image_name: description: image name required: true @@ -34,36 +24,13 @@ on: description: registry required: true type: string - push: - branches: - - main - - devel - paths: - - '.github/workflows/reuse-build-and-publish.yml' - pull_request: - branches: - - main - - devel - types: - - closed - paths: - - '.github/workflows/reuse-build-and-publish.yml' - - '.devcontainer/devcontainer.json' - - 'Dockerfile' - - 'reinstall-cmake.sh' - - 'VERSION' - permissions: contents: read packages: write jobs: reuse-build-and-push: - if: | - ${{ inputs.event_name }} == 'workflow_dispatch' || - ${{ inputs.event_name }} == 'push' || - (${{ inputs.event_name }} == 'pull_request' && - ${{ inputs.pull_request }} == true) + runs-on: ubuntu-latest steps: From 9bdd69713dfbf876ee58dc9d31cb3751dba2c7b0 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:31:24 +0100 Subject: [PATCH 056/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index c1e9245f9..1eb028d67 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -3,8 +3,22 @@ name: Call reusable workflows on: push: branches: - - master + - main - devel + paths: + - '.github/workflows/reuse-build-and-publish-amd.yml' + pull_request: + branches: + - main + - devel + types: + - closed + paths: + - '.github/workflows/reuse-build-and-publish-amd.yml' + - '.devcontainer/devcontainer.json' + - 'Dockerfile' + - 'reinstall-cmake.sh' + - 'VERSION' jobs: call-workflow-amd64: From f97403c10d3d2a8cc48420efa56f611743267ef7 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:31:43 +0100 Subject: [PATCH 057/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 1eb028d67..ef3cd3c0b 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -27,8 +27,6 @@ jobs: packages: write uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@devel with: - event_name: ${{ github.event_name }} - pull_request: ${{ github.pull_request.merged }} image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} actor: ${{ github.actor }} From 838c64640879d831b91a2813cb8bfd00ddf43ad5 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:34:52 +0100 Subject: [PATCH 058/109] Update reuse-build-and-publish.yml --- .github/workflows/reuse-build-and-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index b67b86924..8c004531c 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -65,6 +65,7 @@ jobs: with: context: . push: true + pull_request: true tags: ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.ref_name }} build-args: | CONTAINER_VERSION=${{ env.VERSION }} From 47d4920c1bae1c67167739b564279e2cdcdc7eb1 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:38:38 +0100 Subject: [PATCH 059/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index ef3cd3c0b..7b1b34da8 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -25,7 +25,7 @@ jobs: permissions: contents: read packages: write - uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@devel + uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{ github.ref_name }} with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From 3098c5378d1445364ed96e912454b5554293580e Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:41:44 +0100 Subject: [PATCH 060/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 7b1b34da8..7a751a852 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -1,12 +1,6 @@ name: Call reusable workflows on: - push: - branches: - - main - - devel - paths: - - '.github/workflows/reuse-build-and-publish-amd.yml' pull_request: branches: - main @@ -25,7 +19,7 @@ jobs: permissions: contents: read packages: write - uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{ github.ref_name }} + uses: r-devel/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{ github.ref_name }} with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From fe6319cec280fd5a78d5644a348dcbe8f5544404 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:49:14 +0100 Subject: [PATCH 061/109] Ref name fix to call --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 7a751a852..7457b3274 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -19,7 +19,7 @@ jobs: permissions: contents: read packages: write - uses: r-devel/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{ github.ref_name }} + uses: r-devel/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{github.ref_name}} with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From 26921c865d0ce6ffa8567e62995d9f2cc48e20fe Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:54:34 +0100 Subject: [PATCH 062/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 7457b3274..a42da7000 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -1,6 +1,9 @@ name: Call reusable workflows on: + push: + branches: + - devel pull_request: branches: - main From c67b970910a34869cc5ae07ad42aa35e7e3d0e46 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:55:19 +0100 Subject: [PATCH 063/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index a42da7000..f712ee0b4 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -22,7 +22,7 @@ jobs: permissions: contents: read packages: write - uses: r-devel/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{github.ref_name}} + uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{github.ref_name}} with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From b7a7f32e7bacab43b7295a5cb12d4a2b536fea62 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:57:48 +0100 Subject: [PATCH 064/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index f712ee0b4..084aa8d47 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -22,7 +22,7 @@ jobs: permissions: contents: read packages: write - uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{github.ref_name}} + uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@$GITHUB_REF with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From 2fa7f0572f1c6e9b59cdfa789163d6edf71fbe8d Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:58:44 +0100 Subject: [PATCH 065/109] Adding ref --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 084aa8d47..e37d6474a 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -22,7 +22,7 @@ jobs: permissions: contents: read packages: write - uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@$GITHUB_REF + uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{ github.ref_name }} with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From 180861e057e04a018650dbac8b1434189056b85d Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 12:59:32 +0100 Subject: [PATCH 066/109] remove whitespace --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index e37d6474a..f712ee0b4 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -22,7 +22,7 @@ jobs: permissions: contents: read packages: write - uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{ github.ref_name }} + uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{github.ref_name}} with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From baae071f19d4fc9f94a8577c18e983986f8430b5 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 13:10:06 +0100 Subject: [PATCH 067/109] call locally https://github.blog/changelog/2022-01-25-github-actions-reusable-workflows-can-be-referenced-locally/ --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index f712ee0b4..aa81edc45 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -22,7 +22,7 @@ jobs: permissions: contents: read packages: write - uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@${{github.ref_name}} + uses: ./.github/workflows/reuse-build-and-publish.yml@${{github.ref_name}} with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From 3a11ab9a09814f7e7b5f800efe428ff21cd7f588 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 13:10:47 +0100 Subject: [PATCH 068/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index aa81edc45..380db5015 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -22,7 +22,7 @@ jobs: permissions: contents: read packages: write - uses: ./.github/workflows/reuse-build-and-publish.yml@${{github.ref_name}} + uses: ./.github/workflows/reuse-build-and-publish.yml with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From cd4ec5fdd209471b5e8ef284a588636528de8ebf Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 13:52:41 +0100 Subject: [PATCH 069/109] Update pull-request --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 8c004531c..968290fe7 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -65,7 +65,7 @@ jobs: with: context: . push: true - pull_request: true + pull: true tags: ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.ref_name }} build-args: | CONTAINER_VERSION=${{ env.VERSION }} From a03fa0614fafa72b6b875b01bbbe83f29a153137 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 14:18:24 +0100 Subject: [PATCH 070/109] Testing if statement --- .github/workflows/call_jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 380db5015..df4de252a 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -22,6 +22,7 @@ jobs: permissions: contents: read packages: write + if: ${{ github.ref_name == 'main' }} || ${{ github.ref_name == 'devel' }} uses: ./.github/workflows/reuse-build-and-publish.yml with: image_name: ${{ github.repository }} From ab06202be54a96b3a36cb58e675a1a5603f9d507 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 14:23:08 +0100 Subject: [PATCH 071/109] Update call_jobs.yml with workflows --- .github/workflows/call_jobs.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index df4de252a..96e6cebd6 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -18,12 +18,21 @@ on: - 'VERSION' jobs: - call-workflow-amd64: + call-workflow-amd64-main: + if: ${{ github.ref_name == 'main' }} permissions: contents: read packages: write - if: ${{ github.ref_name == 'main' }} || ${{ github.ref_name == 'devel' }} - uses: ./.github/workflows/reuse-build-and-publish.yml + uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@main + with: + image_name: ${{ github.repository }} + ref_name: ${{ github.ref_name }} + actor: ${{ github.actor }} + registry: ghcr.io + secrets: inherit + call-workflow-amd64-devel: + if: ${{ github.ref_name == 'devel' }} + uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@devel with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From bdb0f08a9444c414a1208d76a6cdd66b61970bd4 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 29 Jul 2025 14:24:14 +0100 Subject: [PATCH 072/109] Update call_jobs.yml --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 96e6cebd6..da24892ed 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -23,7 +23,7 @@ jobs: permissions: contents: read packages: write - uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@main + uses: ./.github/workflows/reuse-build-and-publish.yml with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From f99c69f0efc35559903dabdc5571ce3c204e7f3d Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 10:43:27 +0100 Subject: [PATCH 073/109] Initial manifest script --- scripts/manifestR.R | 229 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 scripts/manifestR.R diff --git a/scripts/manifestR.R b/scripts/manifestR.R new file mode 100644 index 000000000..78ad78b45 --- /dev/null +++ b/scripts/manifestR.R @@ -0,0 +1,229 @@ +# manifestR.R +# +# Files takes the container arguments and creates two files inside the +# given container. These are the build history and manifest files. +# +# The build history file has the locations of the manifest and git history +# files. This is stored in the location given in histlines argument. +# +# The manifest file has the installed apt and R packages written into it +# along with the build time and commit hash for this build. This is is stored +# in the manifestdir location. +# +# Both are stored as markdown files on the container itself. + +library(optparse) + +option_list <- list( + make_option(c("-r", "--registry"), type = "character", default = "ghcr.io", + help = "Registry name"), + make_option(c("-o", "--owner"), type = "character", default = "r-devel", + help = "Current owner of the Repository"), + make_option(c("-i", "--image"), type = "character", default = "devel", + help = "Provide the image name [default %default]"), + make_option(c("-v", "--version"), type = "double", default = 0.3, + help = "version of the image [default %default]"), + make_option(c("-t", "--historydir"), type = "character", + default = "/tmp/hist_lines/", help = "location of history lines"), + make_option(c("-m", "--manifestdir"), type = "character", + default = "/tmp/manifests/", + help = "Manifest file location [default %default]"), + make_option(c("-p", "--repository"), type = "character", + default = "r-dev-env", help = "Repository name [ %default]") +) + +parser <- OptionParser(usage = "%prog [options] file", + option_list = option_list) + +args <- parse_args(parser, positional_arguments = 0) +opt <- args$options + +#set up constants +build_time <- as.numeric(Sys.time()) +tm <- as.POSIXlt(build_time, "UTC") +utc_time <- strftime(tm, "%Y-%m-%dT%H:%M:%S%z") + +manifest_filename <- paste("manifest-", build_time, ".md", collapse = NULL, + sep = "") + +history_filename <- paste("history-", build_time, ".md", collapse = NULL, + sep = "") + +#set up docker +docker_id <- paste(opt$registry, "/", opt$owner, "/", opt$repository, ":", + opt$image, collapse = NULL, sep = "") + +#container_id = system2("docker", args = c("run", "-it -d", docker_id, "bash"), +# stdout = TRUE) + +write_all <- function() { + write_manifest_details() + write_history_details() +} + +write_manifest_details <- function() { + details <- get_manifest_details() + write_manifest(details, opt$manifestdir, manifest_filename) +} + +write_history_details <- function() { + details <- get_build_history() + write_manifest(details, opt$historydir, history_filename) +} + +write_manifest <- function(manifestdata, filepth, filename) { + + my_directory <- file.path(filepth) + if (!dir.exists(my_directory)) { + dir.create(my_directory) + } + + file_conn <- file(manifest_filename) + writeLines(manifestdata, paste(my_directory, filename, + sep = "/", collapse = NULL)) + close(file_conn) +} + +get_manifest_details <- function() { + + buildregistry <- paste("registry", opt$registry, sep = ":") + buildowner <- paste("owner", opt$owner, sep = ":") + buildimage <- paste("image", opt$image, sep = ":") + buildrepository <- paste("repository", opt$repository, sep = ":") + buildtime <- paste("timestamp", build_time, sep = ":") + + r_ver <- r_version() + rbuildversion <- paste("### R Version: ", r_ver, sep = "\n") + + r_package <- r_packages() + rbuildpackages <- paste("### R Packages: ", r_package, sep = "\n") + + apt_package <- apt_packages() + aptbuildpackages <- paste("### APT Packages: ", apt_package, sep = "\n") + + manifest_d <- manifest_string() + + title <- paste(opt$owner, opt$repository, sep = "/") + build_title <- paste("# Build manifest for image ", title, ":", opt$image, + sep = "") + + builds <- paste(build_title, buildregistry, buildrepository, buildowner, + buildimage, buildtime, manifest_d, + rbuildversion, rbuildpackages, aptbuildpackages, " ", + sep = "\n\n") + + builds +} + +get_build_history <- function() { + + platform <- "amd64" + + tags <- "default" + + commit <- get_commit_hash() + + diff_url <- paste("https://github.com/", opt$repository, collapse = NULL, + sep = "") + + diff <- paste("[Git diff](", diff_url, "/commit/", commit, ")", + collapse = NULL, sep = "") + dockerfile <- paste("[Dockerfile](", diff_url, "/blob/", commit, ")", + collapse = NULL, sep = "") + manif <- paste("[Build manifest] (./", manifest_filename, ")", + collapse = NULL, sep = "") + + build_history <- paste(diff, dockerfile, manif, sep = "
") + + image_manifest <- paste("{", tags, ":", platform, "}", collapse = NULL, + sep = "") + + build_conf <- paste(utc_time, image_manifest, build_history, sep = " | ") + + build_conf +} + + +## Git helpers +get_commit_hash <- function() { + arguments <- c("rev-parse", "HEAD") + hash <- system2("git", args = arguments, stdout = TRUE) + hash +} + +get_commit_hash_tag <- function() { + x <- get_commit_hash() + tag <- substr(x, nchar(x) - 12 + 1, nchar(x)) + tag +} + +##Linux Helper +get_linux_release <- function() { + os <- docker_command(c("lsb_release", "-a")) + release <- paste(os, sep = " ", collapse = "\n") + release +} + +#packages +r_version <- function() { + + r_version <- docker_command(c("R", "--version")) + details <- strsplit(r_version, "\r", fixed = TRUE) + version <- paste(details[[1]], details[[3]], sep = " ", collapse = "\n\n") + version +} + +r_packages <- function() { + + # from dockerstack + r <- docker_command(c("R", "--silent", "-e", + "'installed.packages(.Library)[, c(1,3)]'")) + #tidy the response by removing final > and the initial commands + package <- paste(unlist(strsplit(r, "\r", fixed = TRUE)[3:length(r) - 1]), + sep = " ", collapse = "\n") + package +} + +apt_packages <- function() { + e <- docker_command(c("apt", "list", "--installed")) + #remove listing line and then clean up response + install <- paste(strsplit(e, "\r", fixed = TRUE)[2:length(e)], sep = " ", + collapse = " \n") + remove_local <- gsub("\\[installed,local\\]", "", install) + install1 <- gsub("\\[32m", "", remove_local) + installed <- unlist(paste(gsub("\\[0m/now", "", install1), sep = " ", + collapse = " \n")) + installed +} + +# manifest +manifest_string <- function() { + m <- paste("default", get_commit_hash_tag(), utc_time, get_linux_release(), + collapse = NULL, sep = " ") + m +} + +# Docker functions +docker_start <- function() { + args <- system2("docker", args = c("run", "-it -d", docker_id, + "bash"), stdout = TRUE) + args +} + +docker_stop <- function() { + system2("docker", args = c("stop", container_id)) +} + +docker_command <- function(arguments) { + docker <- paste("exec", "-it", container_id, "bash", "-c", + sep = " ", collapse = "") + + a <- paste('"', paste(arguments, sep = " ", collapse = " "), '"', + collapse = NULL) + + cmd <- system2("docker", args = c(docker, a), stdout = TRUE) + cmd +} + +container_id <- docker_start() +write_all() From ee8573db3d83b28c05f56de3478b74adac6d8a98 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 10:44:45 +0100 Subject: [PATCH 074/109] Updated with manifest --- .github/workflows/reuse-build-and-publish.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 8d3ab4c24..b584e2fcc 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -102,3 +102,26 @@ jobs: build-args: | CONTAINER_VERSION=${{ env.VERSION }} labels: ${{ steps.meta.outputs.labels }} + - name: Write manifest and build history file 🏷 + run: | + Rscript manifestR.R \ + --registry ${{ env.REGISTRY }} \ + --owner ${{ env.OWNER }} \ + --image ${{ inputs.image }} \ + --variant ${{ inputs.variant }} \ + --hist-lines-dir /tmp/r-dev/hist_lines/ \ + --manifests-dir /tmp/r-dev/manifests/ \ + --repository ${{ github.repository }} + shell: bash + - name: Upload manifest file 💾 + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-manifest + path: /tmp/jupyter/manifests/${{ inputs.platform }}-${{ inputs.variant }}-${{ inputs.image }}-*.md + retention-days: 3 + - name: Upload build history line 💾 + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-history_line + path: /tmp/jupyter/hist_lines/${{ inputs.platform }}-${{ inputs.variant }}-${{ inputs.image }}-*.txt + retention-days: 3 From 3bab5acb5c3a211f972ec0ff4c5f1b58c5619338 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 10:57:15 +0100 Subject: [PATCH 075/109] Updated with manifest and added r-base to run --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 3b5763731..dbf3e819b 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -72,7 +72,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Write manifest and build history file 🏷 run: | - Rscript manifestR.R \ + apt install r-base -y && Rscript manifestR.R \ --registry ${{ env.REGISTRY }} \ --owner ${{ env.OWNER }} \ --image ${{ inputs.image }} \ From b87815528ccf04faba408a2e7d60e7ff77a43d2d Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 10:58:40 +0100 Subject: [PATCH 076/109] Updated paths --- .github/workflows/reuse-build-and-publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index dbf3e819b..8cec7168c 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -77,19 +77,19 @@ jobs: --owner ${{ env.OWNER }} \ --image ${{ inputs.image }} \ --variant ${{ inputs.variant }} \ - --hist-lines-dir /tmp/r-dev/hist_lines/ \ - --manifests-dir /tmp/r-dev/manifests/ \ + --hist-lines-dir /tmp/r-devel/hist_lines/ \ + --manifests-dir /tmp/r-devel/manifests/ \ --repository ${{ github.repository }} shell: bash - name: Upload manifest file 💾 uses: actions/upload-artifact@v4 with: name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-manifest - path: /tmp/jupyter/manifests/${{ inputs.platform }}-${{ inputs.variant }}-${{ inputs.image }}-*.md + path: /tmp/r-devel/manifests/${{ inputs.platform }}-${{ inputs.variant }}-${{ inputs.image }}-*.md retention-days: 3 - name: Upload build history line 💾 uses: actions/upload-artifact@v4 with: name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-history_line - path: /tmp/jupyter/hist_lines/${{ inputs.platform }}-${{ inputs.variant }}-${{ inputs.image }}-*.txt + path: /tmp/r-devel/hist_lines/${{ inputs.platform }}-${{ inputs.variant }}-${{ inputs.image }}-*.txt retention-days: 3 From 8db1e0c9a94ae7c338edbdabdc530058651b7bbc Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 11:08:48 +0100 Subject: [PATCH 077/109] Updated apt-get --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 8cec7168c..75cd464da 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -72,7 +72,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Write manifest and build history file 🏷 run: | - apt install r-base -y && Rscript manifestR.R \ + sudo apt-get install r-base -y && Rscript manifestR.R \ --registry ${{ env.REGISTRY }} \ --owner ${{ env.OWNER }} \ --image ${{ inputs.image }} \ From 006d100392e8f7bb78bfafbe303886655feb54ba Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 11:21:32 +0100 Subject: [PATCH 078/109] Updated apt-get --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 75cd464da..05d72b952 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -72,7 +72,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Write manifest and build history file 🏷 run: | - sudo apt-get install r-base -y && Rscript manifestR.R \ + sudo apt-get install r-base -y && Rscript scripts/manifestR.R \ --registry ${{ env.REGISTRY }} \ --owner ${{ env.OWNER }} \ --image ${{ inputs.image }} \ From 982c2ea55366b1c3349d409fa128fdcf06c0857c Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 11:34:16 +0100 Subject: [PATCH 079/109] Fixing R libraries --- .github/workflows/reuse-build-and-publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 05d72b952..6e4be4db6 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -72,7 +72,8 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Write manifest and build history file 🏷 run: | - sudo apt-get install r-base -y && Rscript scripts/manifestR.R \ + sudo apt-get install r-base -y && Rscript -e "install.packages('optparse') \ + && Rscript scripts/manifestR.R \ --registry ${{ env.REGISTRY }} \ --owner ${{ env.OWNER }} \ --image ${{ inputs.image }} \ From c19fd2956eb9de9fb0a47bc7662aee9acf62cd26 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 11:50:09 +0100 Subject: [PATCH 080/109] Fixing R libraries --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 6e4be4db6..3331641b1 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -72,7 +72,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Write manifest and build history file 🏷 run: | - sudo apt-get install r-base -y && Rscript -e "install.packages('optparse') \ + sudo apt-get install r-base -y && Rscript -e "install.packages('optparse')" \ && Rscript scripts/manifestR.R \ --registry ${{ env.REGISTRY }} \ --owner ${{ env.OWNER }} \ From 454edb9cc5e097c47e576f61889480518dc018a1 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 12:32:24 +0100 Subject: [PATCH 081/109] Fixing R libraries --- .github/workflows/reuse-build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 3331641b1..f30e2c0aa 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -72,7 +72,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Write manifest and build history file 🏷 run: | - sudo apt-get install r-base -y && Rscript -e "install.packages('optparse')" \ + sudo apt-get install r-base -y && sudo Rscript -e "install.packages('optparse')" \ && Rscript scripts/manifestR.R \ --registry ${{ env.REGISTRY }} \ --owner ${{ env.OWNER }} \ From 2d278dd2e867c144fae836358ab9638deb110f74 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 14:09:21 +0100 Subject: [PATCH 082/109] Fixing input variables --- .github/workflows/reuse-build-and-publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index f30e2c0aa..a8b9b72aa 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -74,13 +74,13 @@ jobs: run: | sudo apt-get install r-base -y && sudo Rscript -e "install.packages('optparse')" \ && Rscript scripts/manifestR.R \ - --registry ${{ env.REGISTRY }} \ - --owner ${{ env.OWNER }} \ - --image ${{ inputs.image }} \ - --variant ${{ inputs.variant }} \ + --registry ${{ inputs.registry }} \ + --owner ${{ inputs.actor}} \ + --image ${{ inputs.image_name }} \ + --version ${{ inputs.ref_name }} \ --hist-lines-dir /tmp/r-devel/hist_lines/ \ --manifests-dir /tmp/r-devel/manifests/ \ - --repository ${{ github.repository }} + --repository ${{ inputs.ref_name }} shell: bash - name: Upload manifest file 💾 uses: actions/upload-artifact@v4 From 1b5e4708be20e9473db1bfe0ba157cc2c45d51c0 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 14:23:26 +0100 Subject: [PATCH 083/109] Removed version --- .github/workflows/reuse-build-and-publish.yml | 1 - scripts/manifestR.R | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index a8b9b72aa..25f98ba29 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -77,7 +77,6 @@ jobs: --registry ${{ inputs.registry }} \ --owner ${{ inputs.actor}} \ --image ${{ inputs.image_name }} \ - --version ${{ inputs.ref_name }} \ --hist-lines-dir /tmp/r-devel/hist_lines/ \ --manifests-dir /tmp/r-devel/manifests/ \ --repository ${{ inputs.ref_name }} diff --git a/scripts/manifestR.R b/scripts/manifestR.R index 78ad78b45..a578a4d4e 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -21,8 +21,6 @@ option_list <- list( help = "Current owner of the Repository"), make_option(c("-i", "--image"), type = "character", default = "devel", help = "Provide the image name [default %default]"), - make_option(c("-v", "--version"), type = "double", default = 0.3, - help = "version of the image [default %default]"), make_option(c("-t", "--historydir"), type = "character", default = "/tmp/hist_lines/", help = "location of history lines"), make_option(c("-m", "--manifestdir"), type = "character", From 871ef23c75ba661aa29f59724b4776fc90e97f7c Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 14:36:31 +0100 Subject: [PATCH 084/109] Updated histrory long line --- .github/workflows/reuse-build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 25f98ba29..5c55068cb 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -77,8 +77,8 @@ jobs: --registry ${{ inputs.registry }} \ --owner ${{ inputs.actor}} \ --image ${{ inputs.image_name }} \ - --hist-lines-dir /tmp/r-devel/hist_lines/ \ - --manifests-dir /tmp/r-devel/manifests/ \ + --historydir /tmp/r-devel/hist_lines/ \ + --manifestdir /tmp/r-devel/manifests/ \ --repository ${{ inputs.ref_name }} shell: bash - name: Upload manifest file 💾 From dced3fe29f23a4c9913cb0c2487e0830c4231379 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 14:58:05 +0100 Subject: [PATCH 085/109] Updated bash run --- scripts/manifestR.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index a578a4d4e..ff10d7575 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -203,8 +203,8 @@ manifest_string <- function() { # Docker functions docker_start <- function() { - args <- system2("docker", args = c("run", "-it -d", docker_id, - "bash"), stdout = TRUE) + args <- system2("docker", args = c("run", "-it -d", docker_id), + stdout = TRUE) args } From 40450f087f7e947c21a0442e43a523744b5d12b1 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 15:41:12 +0100 Subject: [PATCH 086/109] Updated bash run --- scripts/manifestR.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index ff10d7575..6d6a752b2 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -51,8 +51,8 @@ history_filename <- paste("history-", build_time, ".md", collapse = NULL, docker_id <- paste(opt$registry, "/", opt$owner, "/", opt$repository, ":", opt$image, collapse = NULL, sep = "") -#container_id = system2("docker", args = c("run", "-it -d", docker_id, "bash"), -# stdout = TRUE) +container_id = system2("docker", args = c("run", "-it -d", docker_id, "bash"), + stdout = TRUE) write_all <- function() { write_manifest_details() @@ -223,5 +223,5 @@ docker_command <- function(arguments) { cmd } -container_id <- docker_start() +#container_id <- docker_start() write_all() From 7f02e95cf450cfb44415a2f20f9f511b866b35dc Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 16:07:26 +0100 Subject: [PATCH 087/109] Updated bash run --- .github/workflows/reuse-build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 5c55068cb..1407835fa 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -76,10 +76,10 @@ jobs: && Rscript scripts/manifestR.R \ --registry ${{ inputs.registry }} \ --owner ${{ inputs.actor}} \ - --image ${{ inputs.image_name }} \ + --image ${{ inputs.ref_name }} \ --historydir /tmp/r-devel/hist_lines/ \ --manifestdir /tmp/r-devel/manifests/ \ - --repository ${{ inputs.ref_name }} + --repository ${{ inputs.image_name }} shell: bash - name: Upload manifest file 💾 uses: actions/upload-artifact@v4 From 28bb525653a6c4790c041356dcd076556099cda4 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 16:19:15 +0100 Subject: [PATCH 088/109] Updated bash run --- scripts/manifestR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index 6d6a752b2..d2e5c9bd3 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -48,7 +48,7 @@ history_filename <- paste("history-", build_time, ".md", collapse = NULL, sep = "") #set up docker -docker_id <- paste(opt$registry, "/", opt$owner, "/", opt$repository, ":", +docker_id <- paste(opt$registry, "/", opt$repository, ":", opt$image, collapse = NULL, sep = "") container_id = system2("docker", args = c("run", "-it -d", docker_id, "bash"), From 8655adc1a8d6b7e60f0a182acf9966cc6671bf50 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 16:30:38 +0100 Subject: [PATCH 089/109] Updated bash run --- scripts/manifestR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index d2e5c9bd3..3890e0499 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -213,7 +213,7 @@ docker_stop <- function() { } docker_command <- function(arguments) { - docker <- paste("exec", "-it", container_id, "bash", "-c", + docker <- paste("run", "-it -d", docker_id, "bash", "-c", sep = " ", collapse = "") a <- paste('"', paste(arguments, sep = " ", collapse = " "), '"', From 908b7c24d766fef28bd7a5c67f6f007de02e1435 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 16:45:34 +0100 Subject: [PATCH 090/109] Lookign at details --- scripts/manifestR.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index 3890e0499..dd23d76aa 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -167,7 +167,8 @@ r_version <- function() { r_version <- docker_command(c("R", "--version")) details <- strsplit(r_version, "\r", fixed = TRUE) - version <- paste(details[[1]], details[[3]], sep = " ", collapse = "\n\n") + #version <- paste(details[[1]], details[[3]], sep = " ", collapse = "\n\n") + version <- paste(details, sep = " ", collapse = "\n\n") version } From 206070748cd32e13e0d4a4c06bf66575de826159 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 17:06:38 +0100 Subject: [PATCH 091/109] Updated file details --- .github/workflows/reuse-build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 1407835fa..23fac4a61 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -77,8 +77,8 @@ jobs: --registry ${{ inputs.registry }} \ --owner ${{ inputs.actor}} \ --image ${{ inputs.ref_name }} \ - --historydir /tmp/r-devel/hist_lines/ \ - --manifestdir /tmp/r-devel/manifests/ \ + --historydir /tmp/hist_lines \ + --manifestdir /tmp/manifests \ --repository ${{ inputs.image_name }} shell: bash - name: Upload manifest file 💾 From 381681394fc6c0aa35dee4394919561f9e716b6e Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 17:12:29 +0100 Subject: [PATCH 092/109] Added recursive in and altered file paths --- .github/workflows/reuse-build-and-publish.yml | 12 ++++++------ scripts/manifestR.R | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index 23fac4a61..e751e1d75 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -77,19 +77,19 @@ jobs: --registry ${{ inputs.registry }} \ --owner ${{ inputs.actor}} \ --image ${{ inputs.ref_name }} \ - --historydir /tmp/hist_lines \ - --manifestdir /tmp/manifests \ + --historydir /tmp/r-devel/hist_lines \ + --manifestdir /tmp/r-devel/manifests \ --repository ${{ inputs.image_name }} shell: bash - name: Upload manifest file 💾 uses: actions/upload-artifact@v4 with: - name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-manifest - path: /tmp/r-devel/manifests/${{ inputs.platform }}-${{ inputs.variant }}-${{ inputs.image }}-*.md + name: ${{ inputs.image }}-manifest + path: /tmp/r-devel/manifests/${{ inputs.image }}-*.md retention-days: 3 - name: Upload build history line 💾 uses: actions/upload-artifact@v4 with: - name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-history_line - path: /tmp/r-devel/hist_lines/${{ inputs.platform }}-${{ inputs.variant }}-${{ inputs.image }}-*.txt + name: ${{ inputs.image }}-history_line + path: /tmp/r-devel/hist_lines/${{ inputs.image }}-*.txt retention-days: 3 diff --git a/scripts/manifestR.R b/scripts/manifestR.R index dd23d76aa..e88697056 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -73,7 +73,7 @@ write_manifest <- function(manifestdata, filepth, filename) { my_directory <- file.path(filepth) if (!dir.exists(my_directory)) { - dir.create(my_directory) + dir.create(my_directory, recursive = TRUE) } file_conn <- file(manifest_filename) From be9724dc2886b06336b425ec21ba737612a49e40 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 17:35:52 +0100 Subject: [PATCH 093/109] Altered file paths --- .github/workflows/reuse-build-and-publish.yml | 4 ++-- scripts/manifestR.R | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index e751e1d75..a643e3aba 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -85,11 +85,11 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ inputs.image }}-manifest - path: /tmp/r-devel/manifests/${{ inputs.image }}-*.md + path: /tmp/r-devel/manifests/manifest-*.md retention-days: 3 - name: Upload build history line 💾 uses: actions/upload-artifact@v4 with: name: ${{ inputs.image }}-history_line - path: /tmp/r-devel/hist_lines/${{ inputs.image }}-*.txt + path: /tmp/r-devel/hist_lines/history-*.txt retention-days: 3 diff --git a/scripts/manifestR.R b/scripts/manifestR.R index e88697056..6795f53a7 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -44,7 +44,7 @@ utc_time <- strftime(tm, "%Y-%m-%dT%H:%M:%S%z") manifest_filename <- paste("manifest-", build_time, ".md", collapse = NULL, sep = "") -history_filename <- paste("history-", build_time, ".md", collapse = NULL, +history_filename <- paste("history-", build_time, ".txt", collapse = NULL, sep = "") #set up docker From 8c4b8b156cca484f62396ebe1ad685f366957ccf Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 17:54:11 +0100 Subject: [PATCH 094/109] Docker commands --- scripts/manifestR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index 6795f53a7..228903b7a 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -214,7 +214,7 @@ docker_stop <- function() { } docker_command <- function(arguments) { - docker <- paste("run", "-it -d", docker_id, "bash", "-c", + docker <- paste("run", "-it", docker_id, "bash", "-c", sep = " ", collapse = "") a <- paste('"', paste(arguments, sep = " ", collapse = " "), '"', From 47fedb03eaa3de2482a8a3884c3bf00090133a08 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 19:18:19 +0100 Subject: [PATCH 095/109] Update command --- scripts/manifestR.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index 228903b7a..32277ef6e 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -204,7 +204,7 @@ manifest_string <- function() { # Docker functions docker_start <- function() { - args <- system2("docker", args = c("run", "-it -d", docker_id), + args <- system2("docker", args = c("run", "-i -d", docker_id), stdout = TRUE) args } @@ -214,7 +214,7 @@ docker_stop <- function() { } docker_command <- function(arguments) { - docker <- paste("run", "-it", docker_id, "bash", "-c", + docker <- paste("exec", "-i", docker_id, "bash", "-c", sep = " ", collapse = "") a <- paste('"', paste(arguments, sep = " ", collapse = " "), '"', From ab84fe8051699a0ef6314adff1716febe921b416 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 19:18:22 +0100 Subject: [PATCH 096/109] Update command --- scripts/manifestR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index 32277ef6e..ca7a4b6ac 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -51,7 +51,7 @@ history_filename <- paste("history-", build_time, ".txt", collapse = NULL, docker_id <- paste(opt$registry, "/", opt$repository, ":", opt$image, collapse = NULL, sep = "") -container_id = system2("docker", args = c("run", "-it -d", docker_id, "bash"), +container_id = system2("docker", args = c("run", "-i -d", docker_id, "bash"), stdout = TRUE) write_all <- function() { From ead2182ef36556ca02c363e947c32ff3eed2953b Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 19:30:52 +0100 Subject: [PATCH 097/109] Update command --- scripts/manifestR.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index ca7a4b6ac..317c18c0f 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -51,8 +51,8 @@ history_filename <- paste("history-", build_time, ".txt", collapse = NULL, docker_id <- paste(opt$registry, "/", opt$repository, ":", opt$image, collapse = NULL, sep = "") -container_id = system2("docker", args = c("run", "-i -d", docker_id, "bash"), - stdout = TRUE) +#container_id = system2("docker", args = c("run", "-i -d", docker_id, "bash"), +# stdout = TRUE) write_all <- function() { write_manifest_details() @@ -224,5 +224,5 @@ docker_command <- function(arguments) { cmd } -#container_id <- docker_start() +container_id <- docker_start() write_all() From 08908938cf1ecd9c37f3a76c54b2dace0930149b Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 19:42:06 +0100 Subject: [PATCH 098/109] Update command --- scripts/manifestR.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index 317c18c0f..0bcb3d499 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -204,8 +204,8 @@ manifest_string <- function() { # Docker functions docker_start <- function() { - args <- system2("docker", args = c("run", "-i -d", docker_id), - stdout = TRUE) + args <- system2("docker", args = c("run", "-i -d", "-a stdout", "-a stderr", + docker_id), stdout = TRUE) args } @@ -214,7 +214,7 @@ docker_stop <- function() { } docker_command <- function(arguments) { - docker <- paste("exec", "-i", docker_id, "bash", "-c", + docker <- paste("exec", "-i", container_id, "bash", "-c", sep = " ", collapse = "") a <- paste('"', paste(arguments, sep = " ", collapse = " "), '"', From 1c609cd0fb07db20ae2b512954269ddb0c62bc47 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 19:53:21 +0100 Subject: [PATCH 099/109] Update command wth bash --- scripts/manifestR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index 0bcb3d499..f22f8dc7e 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -205,7 +205,7 @@ manifest_string <- function() { # Docker functions docker_start <- function() { args <- system2("docker", args = c("run", "-i -d", "-a stdout", "-a stderr", - docker_id), stdout = TRUE) + docker_id, "bash"), stdout = TRUE) args } From c1e5eb13777c4f018726c4097dd06f0093cfa3ff Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 20:11:11 +0100 Subject: [PATCH 100/109] Update command wth bash --- scripts/manifestR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index f22f8dc7e..ea1e984d8 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -204,7 +204,7 @@ manifest_string <- function() { # Docker functions docker_start <- function() { - args <- system2("docker", args = c("run", "-i -d", "-a stdout", "-a stderr", + args <- system2("docker", args = c("run", "-i", "-a stdout", "-a stderr", docker_id, "bash"), stdout = TRUE) args } From 24035982e6c8f0055fcc468fa13f049610c5af31 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Mon, 11 Aug 2025 20:20:04 +0100 Subject: [PATCH 101/109] Update command wth bash --- scripts/manifestR.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/manifestR.R b/scripts/manifestR.R index ea1e984d8..a6cb64789 100644 --- a/scripts/manifestR.R +++ b/scripts/manifestR.R @@ -204,8 +204,8 @@ manifest_string <- function() { # Docker functions docker_start <- function() { - args <- system2("docker", args = c("run", "-i", "-a stdout", "-a stderr", - docker_id, "bash"), stdout = TRUE) + args <- system2("docker", args = c("run", "-i -d", docker_id, "bash"), + stdout = TRUE) args } From 259cc0e4c608c52c8c99409d84b47f7b3ec92b63 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 12 Aug 2025 09:44:49 +0100 Subject: [PATCH 102/109] Added platform variable --- .github/workflows/call_jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index da24892ed..94a63062f 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -38,4 +38,5 @@ jobs: ref_name: ${{ github.ref_name }} actor: ${{ github.actor }} registry: ghcr.io + platform: amd64 secrets: inherit From 2d854879803d1d423bf783a727dc7387ed62bd9a Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 12 Aug 2025 09:45:12 +0100 Subject: [PATCH 103/109] Added platform variable and altered manifest line' --- .github/workflows/reuse-build-and-publish.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index a643e3aba..f515a539c 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -24,6 +24,10 @@ on: description: registry required: true type: string + platform: + description: platform + required: true + type: string permissions: contents: read packages: write @@ -84,12 +88,12 @@ jobs: - name: Upload manifest file 💾 uses: actions/upload-artifact@v4 with: - name: ${{ inputs.image }}-manifest + name: ${{ inputs.platform }}-manifest path: /tmp/r-devel/manifests/manifest-*.md retention-days: 3 - name: Upload build history line 💾 uses: actions/upload-artifact@v4 with: - name: ${{ inputs.image }}-history_line + name: ${{ inputs.platform }}-history_line path: /tmp/r-devel/hist_lines/history-*.txt retention-days: 3 From f5f3653b4d720033cf57d51fa06fe620e2f77eb4 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 12 Aug 2025 09:47:19 +0100 Subject: [PATCH 104/109] Added platform variable --- .github/workflows/call_jobs.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 94a63062f..67b60671f 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -19,20 +19,10 @@ on: jobs: call-workflow-amd64-main: - if: ${{ github.ref_name == 'main' }} permissions: contents: read packages: write uses: ./.github/workflows/reuse-build-and-publish.yml - with: - image_name: ${{ github.repository }} - ref_name: ${{ github.ref_name }} - actor: ${{ github.actor }} - registry: ghcr.io - secrets: inherit - call-workflow-amd64-devel: - if: ${{ github.ref_name == 'devel' }} - uses: iaine/r-dev-env/.github/workflows/reuse-build-and-publish.yml@devel with: image_name: ${{ github.repository }} ref_name: ${{ github.ref_name }} From c486c8e6aebc74a46c2d1786c1e358a26529973d Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 12 Aug 2025 10:06:44 +0100 Subject: [PATCH 105/109] Added platform variable --- .github/workflows/call_jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index 67b60671f..dad635459 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -18,7 +18,7 @@ on: - 'VERSION' jobs: - call-workflow-amd64-main: + call-workflow-amd64: permissions: contents: read packages: write From 87e5fb289b856caf6986c3ea1da9d116b14c9a0d Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 12 Aug 2025 10:08:11 +0100 Subject: [PATCH 106/109] Tidying test variable --- .github/workflows/call_jobs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/call_jobs.yml b/.github/workflows/call_jobs.yml index dad635459..86567b839 100644 --- a/.github/workflows/call_jobs.yml +++ b/.github/workflows/call_jobs.yml @@ -1,9 +1,6 @@ name: Call reusable workflows on: - push: - branches: - - devel pull_request: branches: - main From ad801a70948bb74036aea59e3b597a6e869134af Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 12 Aug 2025 10:09:01 +0100 Subject: [PATCH 107/109] Tidy manifest name --- scripts/{manifestR.R => manifest.R} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/{manifestR.R => manifest.R} (100%) diff --git a/scripts/manifestR.R b/scripts/manifest.R similarity index 100% rename from scripts/manifestR.R rename to scripts/manifest.R From b1d20e4f458fb46c43a197649291e6a64d0f1f21 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 12 Aug 2025 10:11:11 +0100 Subject: [PATCH 108/109] Added platform to variable --- .github/workflows/reuse-build-and-publish.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reuse-build-and-publish.yml b/.github/workflows/reuse-build-and-publish.yml index f515a539c..9ea4a6a22 100644 --- a/.github/workflows/reuse-build-and-publish.yml +++ b/.github/workflows/reuse-build-and-publish.yml @@ -8,23 +8,23 @@ name: Build and publish amd 64 Docker image on: workflow_call: inputs: - image_name: + image_name: description: image name required: true type: string - ref_name: + ref_name: description: ref name required: true type: string - actor: + actor: description: actor required: true type: string - registry: + registry: description: registry required: true type: string - platform: + platform: description: platform required: true type: string @@ -74,10 +74,10 @@ jobs: build-args: | CONTAINER_VERSION=${{ env.VERSION }} labels: ${{ steps.meta.outputs.labels }} - - name: Write manifest and build history file 🏷 + - name: Write manifest and build history file run: | sudo apt-get install r-base -y && sudo Rscript -e "install.packages('optparse')" \ - && Rscript scripts/manifestR.R \ + && Rscript scripts/manifest.R \ --registry ${{ inputs.registry }} \ --owner ${{ inputs.actor}} \ --image ${{ inputs.ref_name }} \ @@ -85,13 +85,13 @@ jobs: --manifestdir /tmp/r-devel/manifests \ --repository ${{ inputs.image_name }} shell: bash - - name: Upload manifest file 💾 + - name: Upload manifest file uses: actions/upload-artifact@v4 with: name: ${{ inputs.platform }}-manifest path: /tmp/r-devel/manifests/manifest-*.md retention-days: 3 - - name: Upload build history line 💾 + - name: Upload build history line uses: actions/upload-artifact@v4 with: name: ${{ inputs.platform }}-history_line From 93558ffd1db9a2e135e288c13b8da07bbb3f569c Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Tue, 12 Aug 2025 10:12:31 +0100 Subject: [PATCH 109/109] Tidied name --- scripts/manifest.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manifest.R b/scripts/manifest.R index a6cb64789..83fbc66cb 100644 --- a/scripts/manifest.R +++ b/scripts/manifest.R @@ -1,4 +1,4 @@ -# manifestR.R +# manifest.R # # Files takes the container arguments and creates two files inside the # given container. These are the build history and manifest files.