From 7b5cd57c542b78ddacd191988f31603217ae4e30 Mon Sep 17 00:00:00 2001 From: Arjan Molenaar Date: Wed, 30 Aug 2023 10:39:26 +0200 Subject: [PATCH] feat: Always run lint before building images --- .github/workflows/deploy-docker-images.yml | 32 +++++++--------------- .github/workflows/pre-commit.yml | 25 ----------------- 2 files changed, 10 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/deploy-docker-images.yml b/.github/workflows/deploy-docker-images.yml index 5f2b7e23..0abecd74 100644 --- a/.github/workflows/deploy-docker-images.yml +++ b/.github/workflows/deploy-docker-images.yml @@ -12,35 +12,23 @@ env: images: capella/base capella/remote capella/ease capella/readonly jobs: - lint-docker-files: + lint: runs-on: ubuntu-latest - strategy: - matrix: - docker_file: - - "base/Dockerfile" - - "builder/Dockerfile" - - "capella/Dockerfile" - - "ease/debug/Dockerfile" - - "ease/Dockerfile" - - "eclipse/Dockerfile" - - "jupyter-notebook/Dockerfile" - - "papyrus/Dockerfile" - - "pure-variants/Dockerfile" - - "readonly/Dockerfile" - - "remote/Dockerfile" - - "t4c/Dockerfile" - - "tests/local-git-server/Dockerfile" - name: Docker file ${{ matrix.docker_file }} steps: - uses: actions/checkout@v3 - - uses: hadolint/hadolint-action@v3.1.0 + - uses: actions/setup-python@v4 with: - dockerfile: ${{ matrix.docker_file }} - override-info: DL3002,DL3006,DL3008 - failure-threshold: warning + python-version: "3.11" + - name: Install pre-commit + run: |- + python -m pip install pre-commit + - name: Run pre-commit + run: |- + pre-commit run --all-files deploy-docker-images: runs-on: ubuntu-latest + needs: [lint] strategy: matrix: capella_version: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 53ce74fb..00000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors -# SPDX-License-Identifier: CC0-1.0 -name: pre-commit - -on: - push: - branches: ["**"] - tags: ["v*.*.*"] - pull_request: - branches: [main] - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - name: Install pre-commit - run: |- - python -m pip install pre-commit - - name: Run pre-commit - run: |- - pre-commit run --all-files