mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-02 05:23:39 +01:00
Add pre-commit to ci
This commit is contained in:
parent
f48cf0dc9f
commit
29827b1c70
18
.github/workflows/docker-publish.yml
vendored
18
.github/workflows/docker-publish.yml
vendored
@ -30,10 +30,28 @@ env:
|
|||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
pre-commit:
|
||||||
|
name: Linting Checks
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
-
|
||||||
|
name: Install python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
-
|
||||||
|
name: Check files
|
||||||
|
uses: pre-commit/action@v3.0.0
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Docker Build & Push
|
name: Docker Build & Push
|
||||||
if: github.repository == 'gethomepage/homepage'
|
if: github.repository == 'gethomepage/homepage'
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
needs:
|
||||||
|
- pre-commit
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
20
.github/workflows/docs-publish.yml
vendored
20
.github/workflows/docs-publish.yml
vendored
@ -18,10 +18,28 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
pre-commit:
|
||||||
|
name: Linting Checks
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
-
|
||||||
|
name: Install python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
-
|
||||||
|
name: Check files
|
||||||
|
uses: pre-commit/action@v3.0.0
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test Build
|
name: Test Build
|
||||||
if: github.repository == 'gethomepage/homepage' && github.event_name == 'pull_request'
|
if: github.repository == 'gethomepage/homepage' && github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- pre-commit
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
@ -43,6 +61,8 @@ jobs:
|
|||||||
name: Build & Deploy
|
name: Build & Deploy
|
||||||
if: github.repository == 'gethomepage/homepage' && github.event_name != 'pull_request'
|
if: github.repository == 'gethomepage/homepage' && github.event_name != 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- pre-commit
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user