98 lines
2.8 KiB
YAML
98 lines
2.8 KiB
YAML
name: pipeline
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
|
|
permissions:
|
|
packages: write
|
|
|
|
jobs:
|
|
lint-and-format:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ubuntu:25.10
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://gitea.com/actions/checkout@v4
|
|
|
|
- name: Install node and npm
|
|
run: apt-get update && apt-get install -y nodejs npm
|
|
|
|
- name: Install dependencies for frontend
|
|
working-directory: ./frontend
|
|
run: npm ci
|
|
|
|
- name: Lint frontend
|
|
working-directory: ./frontend
|
|
run: npm run lint
|
|
|
|
- name: Check formatting for frontend
|
|
working-directory: ./frontend
|
|
run: npm run format:check
|
|
|
|
- name: Install dependencies for match_collector
|
|
working-directory: ./match_collector
|
|
run: npm ci
|
|
|
|
- name: Lint match_collector
|
|
working-directory: ./match_collector
|
|
run: npm run lint
|
|
|
|
- name: Check formatting for match_collector
|
|
working-directory: ./match_collector
|
|
run: npm run format:check
|
|
|
|
- name: Install dependencies for patch_detector
|
|
working-directory: ./patch_detector
|
|
run: npm ci
|
|
|
|
- name: Lint patch_detector
|
|
working-directory: ./patch_detector
|
|
run: npm run lint
|
|
|
|
- name: Check formatting for patch_detector
|
|
working-directory: ./patch_detector
|
|
run: npm run format:check
|
|
|
|
build-and-push-images:
|
|
needs: lint-and-format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://gitea.com/actions/checkout@v4
|
|
|
|
- name: Log in to container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: https://git.vhaudiquet.fr
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.PACKAGES_TOKEN }}
|
|
|
|
- name: Build and push frontend docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./frontend
|
|
push: true
|
|
tags: |
|
|
git.vhaudiquet.fr/vhaudiquet/lolstats-frontend:latest
|
|
git.vhaudiquet.fr/vhaudiquet/lolstats-frontend:${{ github.sha }}
|
|
|
|
- name: Build and push patch_detector docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./patch_detector
|
|
push: true
|
|
tags: |
|
|
git.vhaudiquet.fr/vhaudiquet/lolstats-patch_detector:latest
|
|
git.vhaudiquet.fr/vhaudiquet/lolstats-patch_detector:${{ github.sha }}
|
|
|
|
- name: Build and push match_collector docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./match_collector
|
|
push: true
|
|
tags: |
|
|
git.vhaudiquet.fr/vhaudiquet/lolstats-match_collector:latest
|
|
git.vhaudiquet.fr/vhaudiquet/lolstats-match_collector:${{ github.sha }}
|