From 8b4faa7337644343c295d6e8b000e91dab34388a Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Mon, 18 Dec 2023 17:45:02 +0100 Subject: [PATCH 1/2] Bump actions/artifact-upload to v4 (#423) This is a revert amendment of https://github.com/aiidalab/aiidalab-docker-stack/pull/419 which merged improperly with test commints. - The changes should significantly speed up artifact upload, see https://github.com/actions/upload-artifact#v4---whats-new - Also include the updates of `action/checkout` action to v4 - include fix the python version of running environment to `3.11`. - include the changes of removing paths change detection in `docker.yml` --------- Co-authored-by: Daniel Hollas --- .github/actions/create-dev-env/action.yml | 2 +- .github/actions/load-image/action.yml | 2 +- .../workflows/docker-build-test-upload.yml | 6 ++- .github/workflows/docker-merge-tags.yml | 6 +-- .github/workflows/docker-push.yml | 4 +- .github/workflows/docker.yml | 44 +------------------ 6 files changed, 12 insertions(+), 52 deletions(-) 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: | 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..bfa6ac78 100644 --- a/.github/workflows/docker-build-test-upload.yml +++ b/.github/workflows/docker-build-test-upload.yml @@ -23,10 +23,11 @@ on: jobs: build-test-upload: runs-on: ${{ inputs.runsOn }} + timeout-minutes: 20 steps: - name: Checkout Repo ⚡️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create dev environment 📦 uses: ./.github/actions/create-dev-env with: @@ -63,9 +64,10 @@ 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 retention-days: 3 + if-no-files-found: error if: always() 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..d9d4480d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,53 +3,11 @@ 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" 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 @@ -213,7 +171,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 1b630fc37f6ec078a3b8df2f1d70321768939db4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 22:21:37 +0100 Subject: [PATCH 2/2] [pre-commit.ci] pre-commit autoupdate (#425) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) - [github.com/psf/black: 23.9.1 → 23.12.1](https://github.com/psf/black/compare/23.9.1...23.12.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9c2edc0f..bcaacc61 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-json - id: check-yaml @@ -19,6 +19,6 @@ repos: args: [--preserve-quotes] - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.12.1 hooks: - id: black