Ajout de 2 workflows pour les merges et reviews
This commit is contained in:
@@ -1,34 +1,40 @@
|
||||
name: "Main Build Process"
|
||||
name: "Generation data pour merge sur master"
|
||||
|
||||
# Runs on main branch commits,
|
||||
# every commit in a pull request, any published release.
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches: ["main"]
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
asciidoc:
|
||||
name: "generate documentation"
|
||||
generateData:
|
||||
if: github.event.pull_request.merged == true
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Get build container
|
||||
id: adocbuild
|
||||
uses: tonynv/asciidoctor-action@master
|
||||
with:
|
||||
program: "asciidoctor -D docs --backend=html5 -o index.html documentation/readme.adoc"
|
||||
- name: Print execution time
|
||||
run: echo "Time ${{ steps.adocbuild.outputs.time }}"
|
||||
- name: Deploy docs to ghpages
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Doc
|
||||
path: ./docs
|
||||
retention-days: 5
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Get build container
|
||||
id: adocbuild
|
||||
uses: tonynv/asciidoctor-action@master
|
||||
with:
|
||||
program: "asciidoctor -D docs --backend=html5 -o index.html documentation/readme.adoc"
|
||||
- name: Print execution time
|
||||
run: echo "Time ${{ steps.adocbuild.outputs.time }}"
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Doc
|
||||
path: ./docs
|
||||
retention-days: 5
|
||||
- name: build docker images
|
||||
run: docker build -t gitea.borealian.ovh/mcmuzzle/ludikzone:latest -f ./docker-prod/Dockerfile .
|
||||
- name: upload image
|
||||
run: |
|
||||
echo "${{ secrets.PERSO_GITEAPASSWORD}}" | docker login gitea.borealian.ovh --username mcmuzzle --password-stdin
|
||||
docker push gitea.borealian.ovh/mcmuzzle/ludikzone:latest
|
||||
|
||||
27
.gitea/workflows/review.yaml
Normal file
27
.gitea/workflows/review.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
name: "Generation data pour merge sur master"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
|
||||
reviewProcess:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Install dependencies
|
||||
run: dotnet restore ./src/LudikZone.sln
|
||||
- name: Build
|
||||
run: dotnet build ./src/LudikZone.sln
|
||||
- name: Test with the dotnet CLI
|
||||
run: dotnet test ./src/LudikZone.sln
|
||||
|
||||
Reference in New Issue
Block a user