From 7e71dcda9b7949669f34dc2b46e3aaf92f91b4f8 Mon Sep 17 00:00:00 2001 From: Farshad DASHTI Date: Mon, 7 Oct 2024 10:08:40 +0100 Subject: [PATCH] Updated readme --- README.md | 74 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index e48455d..3250d88 100644 --- a/README.md +++ b/README.md @@ -19,25 +19,29 @@ For example, if your new library is called "FileService," name the file `build-t #### Example Content (Replace with your library name): ```yaml - name: Build DfE.CoreLibs.FileService - - on: - push: - branches: - - main - paths: - - 'src/DfE.CoreLibs.FileService/**' - - jobs: - build-and-test: - uses: ./.github/workflows/build-test-template.yml - with: - project_name: DfE.CoreLibs.FileService - project_path: src/DfE.CoreLibs.FileService - sonar_project_key: DFE-Digital_corelibs-fileservice - secrets: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + name: Build DfE.CoreLibs.FileService + + on: + push: + branches: + - main + paths: + - 'src/DfE.CoreLibs.FileService/**' + pull_request: + branches: + - main + paths: + - 'src/DfE.CoreLibs.FileService/**' + + jobs: + build-and-test: + uses: ./.github/workflows/build-test-template.yml + with: + project_name: DfE.CoreLibs.FileService + project_path: src/DfE.CoreLibs.FileService + run_tests: false + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} ``` @@ -53,21 +57,23 @@ For example, name the file `pack-FileService.yml` for your new library. #### Example Content (Replace with your library name): ```yaml - name: Pack DfE.CoreLibs.FileService - - on: - workflow_run: - workflows: ["Build DfE.CoreLibs.FileService"] - types: - - completed - - jobs: - build-and-package: - uses: ./.github/workflows/nuget-package-template.yml - with: - project_name: DfE.CoreLibs.FileService - project_path: src/DfE.CoreLibs.FileService - nuget_package_name: DfE.CoreLibs.FileService + name: Pack DfE.CoreLibs.FileService + + on: + workflow_run: + workflows: ["Build DfE.CoreLibs.FileService"] + types: + - completed + + jobs: + build-and-package: + if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.event != 'pull_request' }} + uses: ./.github/workflows/nuget-package-template.yml + with: + project_name: DfE.CoreLibs.FileService + project_path: src/DfE.CoreLibs.FileService + nuget_package_name: DfE.CoreLibs.FileService + ```