From e2253fc1b9b92301df951be1b9a327ebad229b86 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 16 May 2024 14:24:28 +0200 Subject: [PATCH] Run lint as part of export --- .github/workflows/generate-images-drawio.yml | 10 ++++++++++ .github/workflows/generate-images-plantuml.yml | 9 +++++++++ .github/workflows/lint.yml | 2 ++ 3 files changed, 21 insertions(+) diff --git a/.github/workflows/generate-images-drawio.yml b/.github/workflows/generate-images-drawio.yml index c58449a3..a7740a6a 100644 --- a/.github/workflows/generate-images-drawio.yml +++ b/.github/workflows/generate-images-drawio.yml @@ -51,6 +51,16 @@ jobs: find "${{ env.DRAWIO_SRC }}" -name "*.$ext" -exec rm -v "{}" \; done + lint: + runs-on: ubuntu-latest + needs: generate + uses: ./.github/workflows/lint.yml + + commit: + runs-on: ubuntu-latest + needs: lint + + steps: - name: Add & Commit uses: EndBug/add-and-commit@v9 with: diff --git a/.github/workflows/generate-images-plantuml.yml b/.github/workflows/generate-images-plantuml.yml index 4a04c083..79987c44 100644 --- a/.github/workflows/generate-images-plantuml.yml +++ b/.github/workflows/generate-images-plantuml.yml @@ -53,6 +53,15 @@ jobs: rsync -v --recursive --include="*.$ext" --filter="-! */" "${{ env.PLANTUML_SRC }}"/* "${{ env.PLANTUML_OUT }}" done + lint: + needs: generate + uses: ./.github/workflows/lint.yml + + commit: + needs: lint + runs-on: ubuntu-latest + + steps: - name: Add & Commit uses: EndBug/add-and-commit@v9 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2df1daee..07efe4de 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,7 @@ on: push: branches: - main + workflow_call: workflow_dispatch: jobs: @@ -14,6 +15,7 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 + if: ${{ github.event_name != 'workflow_call' }} - name: Verify image references run: |