From b4a3d10887f4f91ce97919401da9902479966c04 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Tue, 27 Sep 2022 23:56:46 +0200 Subject: [PATCH] Add pre-commit --- .github/workflows/pre-commit.yaml | 15 +++++++++++++++ .github/workflows/publish.yaml | 1 + 2 files changed, 16 insertions(+) create mode 100644 .github/workflows/pre-commit.yaml diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..ee37964 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,15 @@ +name: pre-commit + +on: + pull_request: + push: + branches: + - master + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 34de2be..19a830d 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -8,6 +8,7 @@ on: jobs: push_to_registry: name: Push Docker image to Docker Hub + needs: pre-commit runs-on: ubuntu-latest steps: - name: Log in to Docker Hub