working pipeline
This commit is contained in:
11
.github/workflows/cd-backend.yml
vendored
11
.github/workflows/cd-backend.yml
vendored
@@ -10,6 +10,9 @@ jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
environment: battleship
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
steps:
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
@@ -28,13 +31,7 @@ jobs:
|
||||
tags: ${{ secrets.DOCKER_IMAGE_PATH }}:${{ github.sha }}
|
||||
cache-from: type=registry,ref=${{ secrets.DOCKER_IMAGE_PATH }}:buildcache
|
||||
cache-to: type=registry,ref=${{ secrets.DOCKER_IMAGE_PATH }}:buildcache,mode=max
|
||||
azure:
|
||||
runs-on: ubuntu-latest
|
||||
environment: battleship
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
steps:
|
||||
|
||||
-
|
||||
name: Azure login
|
||||
uses: azure/login@v2
|
||||
|
6
.github/workflows/cd-frontend.yml
vendored
6
.github/workflows/cd-frontend.yml
vendored
@@ -2,8 +2,10 @@ name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
tags:
|
||||
- v**
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_site:
|
||||
runs-on: ubuntu-latest
|
||||
|
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
@@ -11,14 +11,30 @@ env:
|
||||
SQLX_OFFLINE: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
backend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Check
|
||||
- name: cargo-check
|
||||
run: cargo check
|
||||
- name: Clippy
|
||||
- name: cargo-Clippy
|
||||
run: cargo clippy
|
||||
- name: Format
|
||||
run: cargo fmt --all --check
|
||||
- name: cargo-fmt
|
||||
run: cargo fmt --all --check
|
||||
frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: 'app/package-lock.json'
|
||||
- name: Install dependencies
|
||||
working-directory: app
|
||||
run: npm install
|
||||
- name: lint
|
||||
working-directory: app
|
||||
run: npm run lint
|
||||
|
Reference in New Issue
Block a user