Files
buildpath/.gitea/workflows/pipeline.yaml
T

79 lines
2.2 KiB
YAML
Raw Normal View History

2024-11-23 18:44:01 +01:00
name: pipeline
on:
push:
branches:
- "main"
permissions:
packages: write
jobs:
2026-01-21 00:59:23 +01:00
lint-and-format:
runs-on: ubuntu-latest
2026-01-21 14:27:22 +01:00
container:
image: ubuntu:25.10
2026-01-21 15:15:26 +01:00
steps:
2026-01-21 14:18:52 +01:00
- name: Install node and npm
run: apt-get update && apt-get install -y nodejs npm
2026-01-21 14:27:22 +01:00
2026-01-21 15:15:26 +01:00
- name: Checkout repository
uses: https://gitea.com/actions/checkout@v4
2026-01-21 00:59:23 +01:00
- name: Install dependencies for frontend
working-directory: ./frontend
run: npm ci
2026-01-21 14:18:52 +01:00
2026-01-21 00:59:23 +01:00
- 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
2024-11-23 19:15:29 +01:00
build-and-push-images:
2026-01-21 00:59:23 +01:00
needs: lint-and-format
2025-01-03 19:15:01 +01:00
runs-on: ubuntu-latest
2024-11-23 18:44:01 +01:00
steps:
- name: Checkout repository
2025-01-14 01:22:44 +01:00
uses: https://gitea.com/actions/checkout@v4
2024-11-23 18:44:01 +01:00
- name: Log in to container registry
uses: docker/login-action@v3
with:
registry: https://git.vhaudiquet.fr
username: ${{ github.actor }}
2024-11-23 19:11:14 +01:00
password: ${{ secrets.PACKAGES_TOKEN }}
2024-11-23 18:44:01 +01:00
2024-11-23 19:15:29 +01:00
- name: Build and push frontend docker image
2024-11-23 18:44:01 +01:00
uses: docker/build-push-action@v6
with:
context: .
file: ./frontend/Dockerfile
2024-11-23 18:44:01 +01:00
push: true
tags: |
git.vhaudiquet.fr/vhaudiquet/lolstats-frontend:latest
git.vhaudiquet.fr/vhaudiquet/lolstats-frontend:${{ github.sha }}
2024-11-23 19:15:29 +01:00
- name: Build and push match_collector docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./match_collector/Dockerfile
2024-11-23 19:15:29 +01:00
push: true
tags: |
git.vhaudiquet.fr/vhaudiquet/lolstats-match_collector:latest
git.vhaudiquet.fr/vhaudiquet/lolstats-match_collector:${{ github.sha }}