Skip to content

Commit

Permalink
Upgrade pre-commit-config (#75)
Browse files Browse the repository at this point in the history
Co-authored-by: Fedor Batonogov <[email protected]>
  • Loading branch information
github-actions[bot] and batonogov authored Mar 23, 2024
1 parent 5db9b1f commit ac98dce
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/AUTO_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
- name: Auto Pull Request
uses: diillson/[email protected]
with:
destination_branch: "main"
destination_branch: main
6 changes: 3 additions & 3 deletions .github/workflows/docker-image-linux-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ name: Docker Image CI Linux ghcr.io
on:
push:
tags:
- "v*.*.*"
- v*.*.*
branches:
- "main"
- main

env:
# Use docker.io for Docker Hub if empty
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
with:
cosign-release: 'v2.1.1'
cosign-release: v2.1.1

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/docker-image-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,24 @@ name: Docker Image CI Linux docker.io
on:
push:
tags:
- "v*.*.*"
- v*.*.*
branches:
- "main"
- main

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile-py3-linux-slim
Expand All @@ -41,8 +37,7 @@ jobs:
${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-linux:${{ github.ref_name }}-slim
${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-linux:latest-slim
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile-py3-linux
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-image-osx-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ name: Docker Image CI OSX ghcr.io
on:
push:
tags:
- "v*.*.*"
- v*.*.*
branches:
- "main"
- main

env:
# Use docker.io for Docker Hub if empty
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
with:
cosign-release: 'v2.1.1'
cosign-release: v2.1.1

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/docker-image-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,24 @@ name: Docker Image CI OSX docker.io
on:
push:
tags:
- "v*.*.*"
- v*.*.*
branches:
- "main"
- main

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile-py3-osx
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-image-windows-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ name: Docker Image CI Windows ghcr.io
on:
push:
tags:
- "v*.*.*"
- v*.*.*
branches:
- "main"
- main

env:
# Use docker.io for Docker Hub if empty
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
with:
cosign-release: 'v2.1.1'
cosign-release: v2.1.1

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/docker-image-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,24 @@ name: Docker Image CI Windows docker.io
on:
push:
tags:
- "v*.*.*"
- v*.*.*
branches:
- "main"
- main

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile-py3-windows
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Message that will be displayed on users' first issue"
pr-message: "Message that will be displayed on users' first pull request"
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: Message that will be displayed on users' first issue
pr-message: Message that will be displayed on users' first pull request
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
uses: actions/checkout@v3
- name: Run Tests
run: |
echo "Building image to test"
./build-and-test.sh Dockerfile-py3-linux
echo "Building image to test"
./build-and-test.sh Dockerfile-py3-linux
linux-slim:
runs-on: ubuntu-latest
Expand All @@ -34,14 +34,14 @@ jobs:
uses: actions/checkout@v3
- name: Run Tests
run: |
echo "Building image to test"
./build-and-test.sh Dockerfile-py3-linux-slim
echo "Building image to test"
./build-and-test.sh Dockerfile-py3-linux-slim
osx:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run Tests
run: |
echo "Building image to test"
./build-and-test.sh Dockerfile-py3-osx
echo "Building image to test"
./build-and-test.sh Dockerfile-py3-osx
40 changes: 25 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: requirements-txt-fixer
- id: debug-statements
- id: detect-private-key
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: requirements-txt-fixer
- id: debug-statements
- id: detect-private-key

- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.3.0
hooks:
- id: black

- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
rev: v2.3.1
hooks:
- id: autoflake

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2', --offset, '2']

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
hooks:
- id: pyupgrade

0 comments on commit ac98dce

Please sign in to comment.