From 3821222a4c8b49396df5d8af702349c5e65ae604 Mon Sep 17 00:00:00 2001 From: codingluke Date: Sun, 8 Dec 2024 14:49:00 +0100 Subject: [PATCH] ci(lint): add linter --- .github/workflows/deploy.yml | 21 ++++++++++++++++++++- neues-projekt/Dockerfile | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d074720..537034f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,6 +15,25 @@ permissions: contents: read jobs: + prettier: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + # Make sure the actual branch is checked out when running on pull requests + ref: ${{ github.head_ref }} + # This is important to fetch the changes to the previous commit + fetch-depth: 0 + - name: Prettify code + uses: creyD/prettier_action@v4.3 + with: + # This part is also where you can pass other options, for example: + prettier_options: --write **/*.{js,md} + only_changed: True # Prüft nur Dateien die geändert wurden test: name: Test runs-on: ubuntu-latest @@ -39,7 +58,7 @@ jobs: name: Deploy runs-on: ubuntu-latest environment: aws - needs: test + needs: [test, prettier] steps: - name: Checkout diff --git a/neues-projekt/Dockerfile b/neues-projekt/Dockerfile index 0624365..f1d08b0 100644 --- a/neues-projekt/Dockerfile +++ b/neues-projekt/Dockerfile @@ -17,7 +17,7 @@ COPY . . RUN npm ci && npm run test:ci && npm run build -# Ab hier beginnt das Produktive Image! +# Ab hier beginnt das produktive Image! FROM node:lts-slim # Das LABEL muss hier gesetzt sein!