-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(all): rename project as Ecotag (#278)
- Loading branch information
1 parent
4690b37
commit dbee23d
Showing
1,184 changed files
with
711,591 additions
and
25,174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,307 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build-windows: | ||
environment: ml-cli | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
- run: dotnet test | ||
|
||
build-linux: | ||
environment: ml-cli | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: npm install | ||
run: npm install | ||
working-directory: src/Ecotag/ClientApp | ||
|
||
- name: npm test | ||
run: npm test -- --runInBand --coverage --watchAll=false | ||
working-directory: src/Ecotag/ClientApp | ||
|
||
- name: npm run build-storybook | ||
run: npm run build-storybook | ||
working-directory: src/Ecotag/ClientApp | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
|
||
#- name: Sonarqube Begin | ||
# if: ${{ github.actor != 'dependabot[bot]' }} | ||
# run: | | ||
# dotnet tool install --global dotnet-sonarscanner | ||
# dotnet test -p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage/opencover.xml | ||
# dotnet sonarscanner begin /d:sonar.login=${{ secrets.SONAR_TOKEN }} /o:AxaGuilDev /k:AxaGuilDev_ml-cli /s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml | ||
|
||
- run: dotnet test /p:CollectCoverage=true | ||
|
||
#- name: Sonarqube end | ||
# if: ${{ github.actor != 'dependabot[bot]' }} | ||
# run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
tags: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
outputs: | ||
new_version: ${{ steps.tag.outputs.new_version }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Add tag to output step | ||
id: tag | ||
run: echo "::set-output name=new_version::${{ steps.tag_version.outputs.new_version }}" | ||
- name: Add changelog to output step | ||
id: changelog | ||
run: echo "::set-output name=changelog::${{ steps.tag_version.outputs.changelog }}" | ||
push_to_registry_from_pull_request: | ||
environment: ml-cli | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
if: github.ref != 'refs/heads/master' | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: AxaGuilDEv/ecotag | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
push_to_registry: | ||
environment: ml-cli | ||
needs: tags | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: AxaGuilDEv/ecotag | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: . | ||
push: true | ||
labels: ${{ steps.meta.outputs.labels }} | ||
tags: AxaGuilDEv/ecotag:${{ needs.tags.outputs.new_version }},AxaGuilDEv/ecotag:latest | ||
release: | ||
environment: ml-cli | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
needs: tags | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: release | ||
uses: actions/create-release@v1 | ||
id: create_release | ||
with: | ||
draft: false | ||
prerelease: false | ||
body: | | ||
${{ needs.tags.outputs.changelog }} | ||
release_name: "v${{ needs.tags.outputs.new_version }}" | ||
tag_name: "v${{ needs.tags.outputs.new_version }}" | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
- run: dotnet publish ./src/MlCli/MlCli.csproj -c Release -r linux-x64 --self-contained=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:AssemblyVersion=${{ needs.tags.outputs.new_version }} --output ./drop/linux-x64/ml-cli | ||
- name: Zip Release | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
filename: ml-cli-linux-x64.zip | ||
path: . | ||
directory: ./drop/linux-x64/ml-cli | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./drop/linux-x64/ml-cli/ml-cli-linux-x64.zip | ||
asset_name: ml-cli-linux-x64.zip | ||
asset_content_type: application/zip | ||
- run: dotnet publish ./src/Ecotag/Ecotag.csproj -c Release -r linux-x64 --self-contained=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:AssemblyVersion=${{ needs.tags.outputs.new_version }} --output ./drop/linux-x64/ecotag | ||
- name: Zip Release | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
filename: ecotag-linux-x64.zip | ||
path: . | ||
directory: ./drop/linux-x64/ecotag | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./drop/linux-x64/ecotag/ecotag-linux-x64.zip | ||
asset_name: ecotag-linux-x64.zip | ||
asset_content_type: application/zip | ||
- run: dotnet publish ./src/MlCli.DemoApi/MlCli.DemoApi.csproj -c Release -r linux-x64 --self-contained=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:AssemblyVersion=${{ needs.tags.outputs.new_version }} --output ./drop/linux-x64/demo-api | ||
- name: Zip Release | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
filename: demo-api-linux-x64.zip | ||
path: . | ||
directory: ./drop/linux-x64/demo-api | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./drop/linux-x64/demo-api/demo-api-linux-x64.zip | ||
asset_name: demo-api-linux-x64.zip | ||
asset_content_type: application/zip | ||
- run: dotnet publish ./src/Ecotag/Ecotag.csproj -c Release -r win-x64 --self-contained=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:AssemblyVersion=${{ needs.tags.outputs.new_version }} --output ./drop/win-x64/ecotag | ||
- name: LibreOffice install Windows x64 | ||
run: | | ||
git clone https://github.com/guillaume-chervet/LibreOfficePortal_7.4.2_winx64.git --depth 1 LibreOffice | ||
mv LibreOffice drop/win-x64/ecotag | ||
ls ./drop/win-x64/ecotag/ | ||
echo "---------------" | ||
cd drop/win-x64/ml-cli | ||
rm appsettings-server.Production.json | ||
cp appsettings-server.DesktopWinx64.json appsettings-server.Production.json | ||
cd ClientApp/build-server | ||
rm environment.json | ||
cp environment.desktop.json environment.json | ||
- name: Zip Release | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
filename: ecotag-win-x64.zip | ||
path: . | ||
directory: ./drop/win-x64/ecotag | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./drop/win-x64/ecotag/ecotag-win-x64.zip | ||
asset_name: ecotag-win-x64.zip | ||
asset_content_type: application/zip | ||
- run: dotnet publish ./src/MlCli.DemoApi/MlCli.DemoApi.csproj -c Release -r win-x64 --self-contained=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:AssemblyVersion=${{ needs.tags.outputs.new_version }} --output ./drop/win-x64/demo-api | ||
- name: Zip Release | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
filename: demo-api-win-x64.zip | ||
path: . | ||
directory: ./drop/win-x64/demo-api | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./drop/win-x64/demo-api/demo-api-win-x64.zip | ||
asset_name: demo-api-win-x64.zip | ||
asset_content_type: application/zip | ||
- run: dotnet publish ./src/Ecotag/Ecotag.csproj -c Release -r osx-x64 --self-contained=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:AssemblyVersion=${{ needs.tags.outputs.new_version }} --output ./drop/osx-x64/ecotag | ||
- name: Zip Release | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
filename: ecotag-osx-x64.zip | ||
path: . | ||
directory: ./drop/osx-x64/ecotag | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./drop/osx-x64/ecotag/ecotag-osx-x64.zip | ||
asset_name: ecotag-osx-x64-.zip | ||
asset_content_type: application/zip | ||
- run: dotnet publish ./src/MlCli.DemoApi/MlCli.DemoApi.csproj -c Release -r osx-x64 --self-contained=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:AssemblyVersion=${{ needs.tags.outputs.new_version }} --output ./drop/osx-x64/demo-api | ||
- name: Zip Release | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
filename: demo-api-osx-x64.zip | ||
path: . | ||
directory: ./drop/osx-x64/demo-api | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./drop/osx-x64/demo-api/demo-api-osx-x64.zip | ||
asset_name: demo-api-osx-x64.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Zip Release | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
filename: demo.zip | ||
path: . | ||
directory: ./demo | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./demo/demo.zip | ||
asset_name: demo.zip | ||
asset_content_type: application/zip |
Oops, something went wrong.