Merge pull request 'Modification ci' (#6) from release/0.0.6 into main
Reviewed-on: Bonsai/Bonsai-webapp#6
This commit is contained in:
@@ -1,37 +1,37 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
branches:
|
types: [published]
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bump-version:
|
docker:
|
||||||
|
name: Build & push Docker image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: https://github.com/docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Gitea container registry
|
||||||
|
uses: https://github.com/docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
registry: git.goutailler-olivier.com
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Set lowercase repo name
|
||||||
uses: actions/setup-node@v4
|
id: repo
|
||||||
|
run: echo "name=$(echo '${{ gitea.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: https://github.com/docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
node-version: '22'
|
context: .
|
||||||
|
push: true
|
||||||
- name: Configure git
|
tags: |
|
||||||
run: |
|
git.goutailler-olivier.com/${{ steps.repo.outputs.name }}:${{ gitea.ref_name }}
|
||||||
git config user.name "github-actions[bot]"
|
git.goutailler-olivier.com/${{ steps.repo.outputs.name }}:latest
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
|
|
||||||
- name: Bump patch version
|
|
||||||
run: npm version patch -m "chore: bump version to %s [skip ci]"
|
|
||||||
|
|
||||||
- name: Push version commit and tag
|
|
||||||
run: |
|
|
||||||
git push
|
|
||||||
git push --tags
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: Sync release into develop
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync-develop:
|
||||||
|
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install curl
|
||||||
|
run: apk add --no-cache curl
|
||||||
|
|
||||||
|
- name: Create PR release → develop
|
||||||
|
run: |
|
||||||
|
RELEASE_BRANCH="${{ github.event.pull_request.head.ref }}"
|
||||||
|
|
||||||
|
curl --fail-with-body -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{
|
||||||
|
\"title\": \"chore: sync ${RELEASE_BRANCH} into develop\",
|
||||||
|
\"head\": \"${RELEASE_BRANCH}\",
|
||||||
|
\"base\": \"develop\",
|
||||||
|
\"body\": \"Synchronisation automatique après merge de ${RELEASE_BRANCH} dans main.\"
|
||||||
|
}" \
|
||||||
|
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/pulls"
|
||||||
@@ -60,6 +60,9 @@
|
|||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular/build:dev-server",
|
"builder": "@angular/build:dev-server",
|
||||||
|
"options": {
|
||||||
|
"proxyConfig": "proxy.conf.json"
|
||||||
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"buildTarget": "Bonsai-webapp:build:production"
|
"buildTarget": "Bonsai-webapp:build:production"
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
location /api {
|
||||||
|
proxy_pass http://api:8080;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"/api": {
|
||||||
|
"target": "http://localhost:8080",
|
||||||
|
"secure": false,
|
||||||
|
"changeOrigin": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ import { Injectable, inject } from '@angular/core';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { IssueEntity } from './issues.store';
|
import { IssueEntity } from './issues.store';
|
||||||
|
|
||||||
export const API_BASE_URL = 'http://localhost:8080';
|
export const API_BASE_URL = '/api';
|
||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class IssuesApiService {
|
export class IssuesApiService {
|
||||||
|
|||||||
Reference in New Issue
Block a user