From 398127b6b76f53d072a67134b021f5dcc5d7991a Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Fri, 15 Dec 2023 01:00:35 +0000 Subject: [PATCH 1/6] Pin Python version in dev environment --- .github/actions/create-dev-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/create-dev-env/action.yml b/.github/actions/create-dev-env/action.yml index 1500927c..85c46980 100644 --- a/.github/actions/create-dev-env/action.yml +++ b/.github/actions/create-dev-env/action.yml @@ -18,7 +18,7 @@ runs: if: ${{ inputs.architecture == 'amd64' }} uses: actions/setup-python@v4 with: - python-version: 3.x + python-version: 3.11 - name: Install Dev Dependencies 📦 run: | From 6a437f87cb0a0a4890e89c99f5476cada547863f Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Fri, 15 Dec 2023 01:02:07 +0000 Subject: [PATCH 2/6] Bump download/upload-artifact actions --- .github/actions/load-image/action.yml | 2 +- .github/workflows/docker-build-test-upload.yml | 4 ++-- .github/workflows/docker-merge-tags.yml | 6 +++--- .github/workflows/docker-push.yml | 4 ++-- .github/workflows/docker.yml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/load-image/action.yml b/.github/actions/load-image/action.yml index 598c17f9..4a8665f9 100644 --- a/.github/actions/load-image/action.yml +++ b/.github/actions/load-image/action.yml @@ -16,7 +16,7 @@ runs: using: composite steps: - name: Download built image 📥 - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ inputs.image }}-${{ inputs.architecture }} path: /tmp/aiidalab diff --git a/.github/workflows/docker-build-test-upload.yml b/.github/workflows/docker-build-test-upload.yml index 68de9054..a38a7252 100644 --- a/.github/workflows/docker-build-test-upload.yml +++ b/.github/workflows/docker-build-test-upload.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout Repo ⚡️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create dev environment 📦 uses: ./.github/actions/create-dev-env with: @@ -63,7 +63,7 @@ jobs: if: always() - name: Upload image as artifact 💾 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ inputs.image }}-${{ inputs.architecture }} path: /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar diff --git a/.github/workflows/docker-merge-tags.yml b/.github/workflows/docker-merge-tags.yml index d99569f9..b0d43fec 100644 --- a/.github/workflows/docker-merge-tags.yml +++ b/.github/workflows/docker-merge-tags.yml @@ -25,19 +25,19 @@ jobs: steps: - name: Checkout Repo ⚡️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create dev environment 📦 uses: ./.github/actions/create-dev-env with: architecture: amd64 - name: Download amd64 tags file 📥 - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ inputs.registry }}-${{ inputs.image }}-amd64-tags path: /tmp/aiidalab - name: Download arm64 tags file 📥 - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ inputs.registry }}-${{ inputs.image }}-arm64-tags path: /tmp/aiidalab diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 3c776bc4..c264b1b1 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout Repo ⚡️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create dev environment 📦 uses: ./.github/actions/create-dev-env with: @@ -87,7 +87,7 @@ jobs: shell: bash - name: Upload tags file 📤 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ inputs.registry }}-${{ inputs.image }}-${{ inputs.architecture }}-tags path: /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}-tags.txt diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a7599294..5b30416d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -213,7 +213,7 @@ jobs: runs-on: ubuntu-latest needs: [merge-tags-ghcr, merge-tags-dockerhub] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create release uses: softprops/action-gh-release@v1 From 96a25f392ffc96b6810dcb0af9c39568b3578409 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Fri, 15 Dec 2023 01:13:17 +0000 Subject: [PATCH 3/6] Use paths-ignore --- .github/workflows/docker.yml | 44 ++---------------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5b30416d..77b8ab8e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,53 +3,13 @@ name: Build, test and push Docker Images on: pull_request: - paths: - - ".github/workflows/docker.yml" - # We use local reusable workflows to make architecture clean an simple - # https://docs.github.com/en/actions/using-workflows/reusing-workflows - - ".github/workflows/docker-build-test-upload.yml" - - ".github/workflows/docker-merge-tags.yml" - - ".github/workflows/docker-push.yml" - - # We use local composite actions to combine multiple workflow steps within one action - # https://docs.github.com/en/actions/creating-actions/about-custom-actions#composite-actions - - ".github/actions/create-dev-env/action.yml" - - ".github/actions/load-image/action.yml" - - - "stack/base/**" - - "stack/base-with-services/**" - - "stack/lab/**" - - "stack/full-stack/**" - - "build.json" - - "docker-bake.hcl" - - "tests/**" - - "requirements-dev.txt" + paths-ignore: + - "**.md" push: branches: - main tags: - "v*" - paths: - - ".github/workflows/docker.yml" - # We use local reusable workflows to make architecture clean an simple - # https://docs.github.com/en/actions/using-workflows/reusing-workflows - - ".github/workflows/docker-build-test-upload.yml" - - ".github/workflows/docker-merge-tags.yml" - - ".github/workflows/docker-push.yml" - - # We use local composite actions to combine multiple workflow steps within one action - # https://docs.github.com/en/actions/creating-actions/about-custom-actions#composite-actions - - ".github/actions/create-dev-env/action.yml" - - ".github/actions/load-image/action.yml" - - - "stack/base/**" - - "stack/base-with-services/**" - - "stack/lab/**" - - "stack/full-stack/**" - - "build.json" - - "docker-bake.hcl" - - "tests/**" - - "requirements-dev.txt" workflow_dispatch: # https://docs.github.com/en/actions/using-jobs/using-concurrency From 3a6caff5f35a6df3a540ef6998020e5e1bc31575 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Fri, 15 Dec 2023 15:26:25 +0000 Subject: [PATCH 4/6] Test upload-artifact without any compression --- .github/workflows/docker-build-test-upload.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-build-test-upload.yml b/.github/workflows/docker-build-test-upload.yml index a38a7252..3652d615 100644 --- a/.github/workflows/docker-build-test-upload.yml +++ b/.github/workflows/docker-build-test-upload.yml @@ -68,4 +68,6 @@ jobs: name: ${{ inputs.image }}-${{ inputs.architecture }} path: /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar retention-days: 3 + compression-level: 0 + if-no-files-found: error if: always() From 832d2f3a0619d59adda249c2eee894ed48145900 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Sat, 16 Dec 2023 04:34:27 +0000 Subject: [PATCH 5/6] compression lvl 1 --- .github/workflows/docker-build-test-upload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test-upload.yml b/.github/workflows/docker-build-test-upload.yml index 3652d615..4469cfc7 100644 --- a/.github/workflows/docker-build-test-upload.yml +++ b/.github/workflows/docker-build-test-upload.yml @@ -68,6 +68,6 @@ jobs: name: ${{ inputs.image }}-${{ inputs.architecture }} path: /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar retention-days: 3 - compression-level: 0 + compression-level: 1 if-no-files-found: error if: always() From 05f1f5188d0f3cf733cffbec7a79a6689a3b4fb4 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Sat, 16 Dec 2023 06:18:05 +0000 Subject: [PATCH 6/6] No compression is faster --- .github/workflows/docker-build-test-upload.yml | 2 +- .github/workflows/docker.yml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/docker-build-test-upload.yml b/.github/workflows/docker-build-test-upload.yml index 4469cfc7..3652d615 100644 --- a/.github/workflows/docker-build-test-upload.yml +++ b/.github/workflows/docker-build-test-upload.yml @@ -68,6 +68,6 @@ jobs: name: ${{ inputs.image }}-${{ inputs.architecture }} path: /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar retention-days: 3 - compression-level: 1 + compression-level: 0 if-no-files-found: error if: always() diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 77b8ab8e..d9d4480d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,8 +3,6 @@ name: Build, test and push Docker Images on: pull_request: - paths-ignore: - - "**.md" push: branches: - main