chore: Add linting
Some checks failed
Build Docker Image / build_docker (push) Failing after 3m9s
Lint / run (push) Failing after 59s
Build, check & Test / run (push) Successful in 9m12s

Signed-off-by: Avior <git@avior.me>
This commit is contained in:
2024-05-23 14:55:52 +02:00
parent 22a20d67d0
commit eb3b41be72
7 changed files with 275 additions and 21 deletions

View File

@ -1,10 +1,6 @@
name: Build, check & Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
on: push
jobs:
run:

View File

@ -1,14 +1,7 @@
name: Build Docker Image
on:
push:
branches:
- '*'
tags:
- v*
pull_request:
branches:
- master
on: push
env:
IMAGE_NAME: ${{ github.repository }}

View File

@ -7,14 +7,13 @@ on:
- closed
# Run when a branch is deleted
delete:
# Config
env:
TOKEN: ${{ secrets.GIT_TOKEN }}
GROUP: avior
TYPE: container
PACKAGE: ifremer-loop
jobs:
pull_request:
@ -24,9 +23,9 @@ jobs:
steps:
- name: Delete package
run: |
curl --fail -X 'DELETE' "https://git.dzeio.com/api/v1/packages/${GROUP}/${TYPE}/${PACKAGE}/${VERSION}" -H 'accept: application/json' -H "Authorization: token ${TOKEN}"
curl --fail -X 'DELETE' "https://git.dzeio.com/api/v1/packages/${GROUP}/${TYPE}/${PACKAGE}/${VERSION}" -H 'accept: application/json' -H "Authorization: token ${TOKEN}"
env:
VERSION: pr-${{ github.event.number }}-head
VERSION: pr-${{ github.event.number }}-head
branch:
runs-on: ubuntu-latest
name: Delete the package on a deleted branch
@ -34,11 +33,10 @@ jobs:
steps:
- name: Delete package
run: |
curl --fail -X 'DELETE' "https://git.dzeio.com/api/v1/packages/${GROUP}/${TYPE}/${PACKAGE}/${VERSION}" -H 'accept: application/json' -H "Authorization: token ${TOKEN}"
curl --fail -X 'DELETE' "https://git.dzeio.com/api/v1/packages/${GROUP}/${TYPE}/${PACKAGE}/${VERSION}" -H 'accept: application/json' -H "Authorization: token ${TOKEN}"
env:
TOKEN: ${{ secrets.GIT_TOKEN }}
GROUP: avior
TYPE: container
PACKAGE: ifremer-loop
VERSION: branch-${{ github.event.ref }}

28
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Lint
on: push
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run BiomeJS
run: npm run lint
# - uses: mongolyy/reviewdog-action-biome@v1
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# reporter: gitea-pr-review
# filter_mode: diff_context
# fail_on_error: true