From 5caa3841efeb6e60598bb464edfd1f5c387be035 Mon Sep 17 00:00:00 2001 From: Dan Benitah Date: Tue, 11 Jul 2023 07:38:14 +0100 Subject: [PATCH] Devops/clean up workflows (#361) * cleaning workflows Signed-off-by: Dan Benitah * pull request should on trigger for pull request event - removing on push for PRs Signed-off-by: Dan Benitah * syntax Signed-off-by: Dan Benitah * syntax Signed-off-by: Dan Benitah * moving markdown linting and disabling 2.a-deploy Signed-off-by: Dan Benitah * adding some jobs dependencies so packaging does not run if code does not build etc... Signed-off-by: Dan Benitah * moving code analysis into the build step and clean up Signed-off-by: Dan Benitah --------- Signed-off-by: Dan Benitah Co-authored-by: danuw --- .github/workflows/{stale.yml => 0-stale.yml} | 2 +- .github/workflows/1-pr.yaml | 247 ++++++++++++++++++ .github/workflows/2-pre-release.yaml | 2 +- .github/workflows/2.a-deploy.yaml | 42 +++ .github/workflows/build-cli-dotnet.yaml | 34 --- .github/workflows/build-packages.yaml | 56 ---- .github/workflows/build-webapi.yaml | 125 --------- .github/workflows/codeQL-analysis.yaml | 81 ------ .github/workflows/dev_carbon-aware-api.yml | 2 +- .github/workflows/linting.yaml | 35 --- .github/workflows/run-sdkCLI-githubaction.yml | 48 ++-- 11 files changed, 316 insertions(+), 358 deletions(-) rename .github/workflows/{stale.yml => 0-stale.yml} (97%) create mode 100644 .github/workflows/1-pr.yaml create mode 100644 .github/workflows/2.a-deploy.yaml delete mode 100644 .github/workflows/build-cli-dotnet.yaml delete mode 100644 .github/workflows/build-packages.yaml delete mode 100644 .github/workflows/build-webapi.yaml delete mode 100644 .github/workflows/codeQL-analysis.yaml delete mode 100644 .github/workflows/linting.yaml diff --git a/.github/workflows/stale.yml b/.github/workflows/0-stale.yml similarity index 97% rename from .github/workflows/stale.yml rename to .github/workflows/0-stale.yml index 8d284a327..e06fa67b1 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/0-stale.yml @@ -3,7 +3,7 @@ # You can adjust the behavior by modifying this file. # For more information, see: # https://github.com/actions/stale -name: Mark stale issues and pull requests +name: 0-Mark stale issues and pull requests on: schedule: diff --git a/.github/workflows/1-pr.yaml b/.github/workflows/1-pr.yaml new file mode 100644 index 000000000..c6d8f9f44 --- /dev/null +++ b/.github/workflows/1-pr.yaml @@ -0,0 +1,247 @@ +name: 1-PR checks +on: + pull_request: + branches: [ dev, main ] + workflow_dispatch: + +env: + # web app + DOCKERFILE_PATH: "CarbonAware.WebApi/src/Dockerfile" + HEALTH_ENDPOINT: "0.0.0.0:8080/health" + DLL_FILE_PATH: "./bin/Release/net6.0/CarbonAware.WebApi.dll" + DOTNET_SRC_DIR: "./src" + # console app packages + DOTNET_SOLUTION: "src/GSF.CarbonAware/src/GSF.CarbonAware.csproj" + OUTPUT_DIR: "packages" + CONSOLE_APP: "samples/lib-integration/ConsoleApp/ConsoleApp.csproj" + CREATE_PKGS: "scripts/package/create_packages.ps1" + ADD_PKGS: "scripts/package/add_packages.ps1" + + +jobs: + sln-build-and-test: + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + defaults: + run: + working-directory: ./src + steps: + + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore + + - name: Unit Tests + run: dotnet test --no-build --verbosity normal + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + #- name: Autobuild + # uses: github/codeql-action/autobuild@v2 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + + webapp-container-dotnet-build: + needs: sln-build-and-test + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/dotnet/sdk:6.0 + steps: + - uses: actions/checkout@v3 + + - name: Setup .NET Core SDK 6 + uses: actions/setup-dotnet@v2 + with: + dotnet-version: '6.0.x' + include-prerelease: false + + - name: Install dependencies + run: dotnet restore + working-directory: ${{ env.DOTNET_SRC_DIR }} + + - name: Install tools + run: dotnet tool restore + working-directory: ${{ env.DOTNET_SRC_DIR }}/CarbonAware.WebApi/src + + - name: Build + run: dotnet build --configuration Release --no-restore + working-directory: ${{ env.DOTNET_SRC_DIR }} + + - name: Unit Test + Code Coverage + run: dotnet test --filter TestCategory=Unit --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=json + working-directory: ${{ env.DOTNET_SRC_DIR }} + + - name: Integration Test + Code Coverage + run: dotnet test --filter TestCategory=Integration --no-restore --verbosity normal /p:CollectCoverage=true /p:MergeWith=\"./coverage.json\" /p:CoverletOutputFormat=\"json,opencover\" + working-directory: ${{ env.DOTNET_SRC_DIR }} + + - name: Codecov + uses: codecov/codecov-action@v2 + with: + directory: ${{ env.DOTNET_SRC_DIR }} + + - name: Generate Open API + run: dotnet tool run swagger tofile --output ./wwwroot/api/v1/swagger.yaml --yaml ${{ env.DLL_FILE_PATH }} v1 + working-directory: ./src/CarbonAware.WebApi/src + + - name: Upload swagger artifact + uses: actions/upload-artifact@v1 + with: + name: pr-swagger.yaml + path: src/CarbonAware.WebApi/src/wwwroot/api/v1/swagger.yaml + + webapp-container-validation: + needs: sln-build-and-test + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Docker Target Final + run: docker build . -f ${DOCKERFILE_PATH} -t ca-api + working-directory: ./src + + - name: Docker Run Container + run: | + docker run -d --name runnable-container -p 8080:80 ca-api + docker container ls + + - name: Docker WGET Health Endpoint + run: | + wget -t 5 --waitretry=5 ${HEALTH_ENDPOINT} + + api-comparison: + needs: webapp-container-dotnet-build + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./src/CarbonAware.WebApi/src + container: + image: mcr.microsoft.com/dotnet/sdk + steps: + - name: Checkout Dev Branch + uses: actions/checkout@v3 + with: + ref: dev + - name: Setup .NET Core SDK 6 + uses: actions/setup-dotnet@v2 + with: + dotnet-version: '6.0.x' + include-prerelease: false + - name: Install dependencies + run: dotnet restore + working-directory: ${{ env.DOTNET_SRC_DIR }} + - name: Install tools + run: dotnet tool restore + - name: Build + run: dotnet build --configuration Release --no-restore + working-directory: ${{ env.DOTNET_SRC_DIR }} + - name: Generate Open API + run: dotnet tool run swagger tofile --output ./wwwroot/api/v1/swagger.yaml --yaml ${{ env.DLL_FILE_PATH }} v1 + - name: Upload dev artifact + uses: actions/upload-artifact@v1 + with: + name: dev-swagger.yaml + path: src/CarbonAware.WebApi/src/wwwroot/api/v1/swagger.yaml + - uses: actions/download-artifact@v3 + with: + name: pr-swagger.yaml + path: ./src/CarbonAware.WebApi/src/wwwroot/api/v1/pr-swagger.yaml + - name: API Diff Comparison + run: | + diff ./wwwroot/api/v1/pr-swagger.yaml ./wwwroot/api/v1/swagger.yaml && echo "No API Changes detected" || echo "::warning:: API Changed" + + dotnet-pack: + needs: sln-build-and-test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup .NET Core SDK 6 + uses: actions/setup-dotnet@v2 + with: + dotnet-version: '6.0.x' + include-prerelease: false + + - name: Create packages + shell: pwsh + run: ${{ env.CREATE_PKGS }} ${{ env.DOTNET_SOLUTION }} ${{ env.OUTPUT_DIR }} + + - name: Restore current packages for ConsoleApp + run: dotnet restore ${{ env.CONSOLE_APP }} + + - name: Add packages to ConsoleApp + shell: pwsh + run: ${{ env.ADD_PKGS }} ${{ env.CONSOLE_APP}} ${{ env.OUTPUT_DIR }} + + - name: Cat ConsoleApp project file + run: cat ${{ env.CONSOLE_APP }} + + - name: Restore packages for ConsoleApp + run: dotnet restore ${{ env.CONSOLE_APP }} + + - name: Build ConsoleApp + run: dotnet build ${{ env.CONSOLE_APP }} + + # Non-blocking job that checks .md file locations and also lints them + markdown-linting: + runs-on: ubuntu-latest + steps: + - name: Check out the code + uses: actions/checkout@v2 + + # See the script for details about exceptions to this check + - name: Markdown files should be located in docs folder + continue-on-error: true + run: "scripts/markdown/check-markdown-files.sh" + + - name: markdownlint-cli2-action + uses: DavidAnson/markdownlint-cli2-action@v9 + continue-on-error: true + with: + command: config + globs: | + ./custom.markdownlint.jsonc + {"*[^.github]/**,*"}.md \ No newline at end of file diff --git a/.github/workflows/2-pre-release.yaml b/.github/workflows/2-pre-release.yaml index b04b85ec1..11f07d5f0 100644 --- a/.github/workflows/2-pre-release.yaml +++ b/.github/workflows/2-pre-release.yaml @@ -1,4 +1,4 @@ -name: Publish container image to GitHub Packages +name: 2-Publish container image to GitHub Packages on: push: diff --git a/.github/workflows/2.a-deploy.yaml b/.github/workflows/2.a-deploy.yaml new file mode 100644 index 000000000..28068412d --- /dev/null +++ b/.github/workflows/2.a-deploy.yaml @@ -0,0 +1,42 @@ +# # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# # More GitHub Actions for Azure: https://github.com/Azure/actions + +# name: 2.a-Deploy Container to Azure Web App - carbon-aware-api + +# # Check what scenario we are in +# # If push to dev, deploy latest pre image + +# # TODO: +# # - add how to get the latest pre package +# # - test? +# # - deploy (existing code to use new image instead of what would have come from build step) + +# on: +# push: +# branches: +# - dev +# workflow_dispatch: + +# jobs: +# deploy: +# runs-on: ubuntu-latest +# permissions: +# packages: read +# environment: +# name: 'Production' +# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + +# steps: +# - name: Download artifact from build job +# uses: actions/download-artifact@v2 +# with: +# name: CarbonAwareApi + +# - name: Deploy to Azure Web App +# id: deploy-to-webapp +# uses: azure/webapps-deploy@v2 +# with: +# app-name: 'carbon-aware-api' +# slot-name: 'Production' +# publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D9BE266F4F034E79818711107BC7DDC5 }} +# package: . \ No newline at end of file diff --git a/.github/workflows/build-cli-dotnet.yaml b/.github/workflows/build-cli-dotnet.yaml deleted file mode 100644 index 86e667aba..000000000 --- a/.github/workflows/build-cli-dotnet.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: BUILD CLI in DOTNET - -on: - push: - paths: - - 'src/**' - - '.github/workflows/**' - pull_request: - branches: [ dev, main ] - paths: - - 'src/**' - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./src - steps: - - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 6.0.x - - - name: Restore dependencies - run: dotnet restore - - - name: Build - run: dotnet build --no-restore - - - name: Unit Tests - run: dotnet test --no-build --verbosity normal \ No newline at end of file diff --git a/.github/workflows/build-packages.yaml b/.github/workflows/build-packages.yaml deleted file mode 100644 index 8d195e05f..000000000 --- a/.github/workflows/build-packages.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: Build and Install GSF Packages on Sample ConsoleApp - -on: - push: - branches: [ dev, main ] - pull_request: - branches: [ dev, main ] - paths: - - 'src/**' - - '.github/workflows/**' - - 'samples/lib-integration/ConsoleApp/**' - - 'scripts/package/**' - -env: - DOTNET_SOLUTION: "src/GSF.CarbonAware/src/GSF.CarbonAware.csproj" - OUTPUT_DIR: "packages" - CONSOLE_APP: "samples/lib-integration/ConsoleApp/ConsoleApp.csproj" - CREATE_PKGS: "scripts/package/create_packages.ps1" - ADD_PKGS: "scripts/package/add_packages.ps1" - -jobs: - dotnet-pack: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v2 - with: - dotnet-version: '6.0.x' - include-prerelease: false - - - name: Create packages - shell: pwsh - run: ${{ env.CREATE_PKGS }} ${{ env.DOTNET_SOLUTION }} ${{ env.OUTPUT_DIR }} - - - name: Restore current packages for ConsoleApp - run: dotnet restore ${{ env.CONSOLE_APP }} - - - name: Add packages to ConsoleApp - shell: pwsh - run: ${{ env.ADD_PKGS }} ${{ env.CONSOLE_APP}} ${{ env.OUTPUT_DIR }} - - - name: Cat ConsoleApp project file - run: cat ${{ env.CONSOLE_APP }} - - - name: Restore packages for ConsoleApp - run: dotnet restore ${{ env.CONSOLE_APP }} - - - name: Build ConsoleApp - run: dotnet build ${{ env.CONSOLE_APP }} - - - name: Run ConsoleApp - run: dotnet run --project ${{ env.CONSOLE_APP }} - diff --git a/.github/workflows/build-webapi.yaml b/.github/workflows/build-webapi.yaml deleted file mode 100644 index 2171b6b1d..000000000 --- a/.github/workflows/build-webapi.yaml +++ /dev/null @@ -1,125 +0,0 @@ -name: Docker Web API Build - -on: - push: - branches: [ dev, main ] - pull_request: - branches: [ dev, main ] - paths: - - 'src/**' - - '.github/workflows/**' - -env: - DOCKERFILE_PATH: "CarbonAware.WebApi/src/Dockerfile" - HEALTH_ENDPOINT: "0.0.0.0:8080/health" - DLL_FILE_PATH: "./bin/Release/net6.0/CarbonAware.WebApi.dll" - DOTNET_SRC_DIR: "./src" - -jobs: - container-dotnet-build: - runs-on: ubuntu-latest - container: - image: mcr.microsoft.com/dotnet/sdk:6.0 - steps: - - uses: actions/checkout@v3 - - - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v2 - with: - dotnet-version: '6.0.x' - include-prerelease: false - - - name: Install dependencies - run: dotnet restore - working-directory: ${{ env.DOTNET_SRC_DIR }} - - - name: Install tools - run: dotnet tool restore - working-directory: ${{ env.DOTNET_SRC_DIR }}/CarbonAware.WebApi/src - - - name: Build - run: dotnet build --configuration Release --no-restore - working-directory: ${{ env.DOTNET_SRC_DIR }} - - - name: Unit Test + Code Coverage - run: dotnet test --filter TestCategory=Unit --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=json - working-directory: ${{ env.DOTNET_SRC_DIR }} - - - name: Integration Test + Code Coverage - run: dotnet test --filter TestCategory=Integration --no-restore --verbosity normal /p:CollectCoverage=true /p:MergeWith=\"./coverage.json\" /p:CoverletOutputFormat=\"json,opencover\" - working-directory: ${{ env.DOTNET_SRC_DIR }} - - - name: Codecov - uses: codecov/codecov-action@v2 - with: - directory: ${{ env.DOTNET_SRC_DIR }} - - - name: Generate Open API - run: dotnet tool run swagger tofile --output ./wwwroot/api/v1/swagger.yaml --yaml ${{ env.DLL_FILE_PATH }} v1 - working-directory: ./src/CarbonAware.WebApi/src - - - name: Upload artifact - uses: actions/upload-artifact@v1 - with: - name: pr-swagger.yaml - path: src/CarbonAware.WebApi/src/wwwroot/api/v1/swagger.yaml - - container-validation: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Docker Target Final - run: docker build . -f ${DOCKERFILE_PATH} -t ca-api - working-directory: ./src - - - name: Docker Run Container - run: | - docker run -d --name runnable-container -p 8080:80 ca-api - docker container ls - - - name: Docker WGET Health Endpoint - run: | - wget -t 5 --waitretry=5 ${HEALTH_ENDPOINT} - -# api-comparison: -# needs: container-dotnet-build -# runs-on: ubuntu-latest -# defaults: -# run: -# working-directory: ./src/CarbonAware.WebApi/src -# container: -# image: mcr.microsoft.com/dotnet/sdk -# steps: -# - name: Checkout Dev Branch -# uses: actions/checkout@v3 -# with: -# ref: dev -# - name: Setup .NET Core SDK 6 -# uses: actions/setup-dotnet@v2 -# with: -# dotnet-version: '6.0.x' -# include-prerelease: false -# - name: Install dependencies -# run: dotnet restore -# working-directory: ${{ env.DOTNET_SRC_DIR }} -# - name: Install tools -# run: dotnet tool restore -# - name: Build -# run: dotnet build --configuration Release --no-restore -# working-directory: ${{ env.DOTNET_SRC_DIR }} -# - name: Generate Open API -# run: dotnet tool run swagger tofile --output ./wwwroot/api/v1/swagger.yaml --yaml ${{ env.DLL_FILE_PATH }} v1 -# - name: Upload dev artifact -# uses: actions/upload-artifact@v1 -# with: -# name: dev-swagger.yaml -# path: src/CarbonAware.WebApi/src/wwwroot/api/v1/swagger.yaml -# - uses: actions/download-artifact@v3 -# with: -# name: pr-swagger.yaml -# path: ./src/CarbonAware.WebApi/src/wwwroot/api/v1/pr-swagger.yaml -# - name: API Diff Comparison -# run: | -# diff ./wwwroot/api/v1/pr-swagger.yaml ./wwwroot/api/v1/swagger.yaml && echo "No API Changes detected" || echo "::warning:: API Changed" diff --git a/.github/workflows/codeQL-analysis.yaml b/.github/workflows/codeQL-analysis.yaml deleted file mode 100644 index 7624b0f52..000000000 --- a/.github/workflows/codeQL-analysis.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "Code Security Scan with CodeQL" - -on: - push: - pull_request: - # The branches below must be a subset of the branches above - branches: [ dev, main ] - schedule: - - cron: '42 23 * * 5' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'csharp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '6.0' - - - name: Restore dependencies - run: dotnet restore - working-directory: './src/' - - name: Build - run: dotnet build --no-restore - working-directory: './src/' - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - #- name: Autobuild - # uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/dev_carbon-aware-api.yml b/.github/workflows/dev_carbon-aware-api.yml index 9eb8aba88..fc3dc2494 100644 --- a/.github/workflows/dev_carbon-aware-api.yml +++ b/.github/workflows/dev_carbon-aware-api.yml @@ -1,7 +1,7 @@ # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy # More GitHub Actions for Azure: https://github.com/Azure/actions -name: Build and deploy ASP.Net Core app to Azure Web App - carbon-aware-api +name: 2.a-Build and deploy ASP.Net Core app to Azure Web App - carbon-aware-api on: push: diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml deleted file mode 100644 index dbf6e651a..000000000 --- a/.github/workflows/linting.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: "Linting" - -on: - push: - paths: - - './**' - - '.github/workflows/**' - pull_request: - branches: [ dev, main ] - paths: - - './**' - -jobs: - # Non-blocking job that checks .md file locations and also lints them - markdown: - runs-on: ubuntu-latest - steps: - - name: Check out the code - uses: actions/checkout@v2 - - # See the script for details about exceptions to this check - - name: Markdown files should be located in docs folder - continue-on-error: true - run: "scripts/markdown/check-markdown-files.sh" - - - name: markdownlint-cli2-action - uses: DavidAnson/markdownlint-cli2-action@v9 - continue-on-error: true - with: - command: config - globs: | - ./custom.markdownlint.jsonc - {"*[^.github]/**,*"}.md - - diff --git a/.github/workflows/run-sdkCLI-githubaction.yml b/.github/workflows/run-sdkCLI-githubaction.yml index 76d4687fc..8cf1d34a8 100644 --- a/.github/workflows/run-sdkCLI-githubaction.yml +++ b/.github/workflows/run-sdkCLI-githubaction.yml @@ -1,28 +1,28 @@ -name: using CarboneAware Github action in sample pipeline +# name: using CarboneAware Github action in sample pipeline -on: - push: - paths: - - 'src/**' - - '.github/workflows/**' - pull_request: - branches: [ dev, main ] - paths: - - 'src/**' +# on: +# push: +# paths: +# - 'src/**' +# - '.github/workflows/**' +# pull_request: +# branches: [ dev, main ] +# paths: +# - 'src/**' -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: CarboneAWare metrics - id: carboneaware-metrics - uses: Green-Software-Foundation/carbon-aware-sdk@sdkCLI-githubaction # here "sdkCLI-githubaction" is the name of the branch - with: - location: westeurope,francecentral,westus - #config: /carbon-aware.json - #fromTime: - #toTime: +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - name: CarboneAWare metrics +# id: carboneaware-metrics +# uses: Green-Software-Foundation/carbon-aware-sdk@sdkCLI-githubaction # here "sdkCLI-githubaction" is the name of the branch +# with: +# location: westeurope,francecentral,westus +# #config: /carbon-aware.json +# #fromTime: +# #toTime: - - name: Deplpoy Workload to Selected Region - run: echo deploying ML Training Job to Region "${{ steps.carboneaware-metrics.outputs.LowestEmissionsLocation}}" +# - name: Deplpoy Workload to Selected Region +# run: echo deploying ML Training Job to Region "${{ steps.carboneaware-metrics.outputs.LowestEmissionsLocation}}"