From 76de084efc30182b3c41e73b377c0609f8eccb0c Mon Sep 17 00:00:00 2001 From: Chris Ayers Date: Wed, 6 Jul 2022 16:54:09 -0400 Subject: [PATCH] updated samples --- .github/workflows/01-basic-multiple-jobs.yml | 6 +++--- .github/workflows/06-expressions.yml | 4 ++-- .github/workflows/09-node.js-matrix.yml | 2 -- .github/workflows/10-dotnet.yml | 8 ++++++-- .github/workflows/docker-image.yml | 6 +++--- dotnet-sample/Program.cs | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/01-basic-multiple-jobs.yml b/.github/workflows/01-basic-multiple-jobs.yml index c4563bb..6a6c4bb 100644 --- a/.github/workflows/01-basic-multiple-jobs.yml +++ b/.github/workflows/01-basic-multiple-jobs.yml @@ -23,7 +23,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Runs a single command using the runners shell - - name: Run a one-line script + - name: Hello Job1 run: echo Hello from job1 job2: # The type of runner that the job will run on @@ -32,7 +32,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Runs a single command using the runners shell - - name: Run a one-line script + - name: Hello Job2 run: echo Hello from job2 job3: # The type of runner that the job will run on @@ -41,5 +41,5 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Runs a single command using the runners shell - - name: Run a one-line script + - name: Hello Job3 run: echo Hello from job3 diff --git a/.github/workflows/06-expressions.yml b/.github/workflows/06-expressions.yml index 37e7fa1..da3cbc6 100644 --- a/.github/workflows/06-expressions.yml +++ b/.github/workflows/06-expressions.yml @@ -17,8 +17,8 @@ env: formatting: ${{ format('{{Hello {0} {1} {2}!}}', 'Mona', 'the', 'Octocat') }} endsWith: ${{ endsWith('Hello world', 'ld') }} containsString: ${{ contains('Hello world', 'llo') }} - containsArray: ${{ contains(fromJson('["Chris","Michael","Mauro"]'), 'chris') }} - presentersString: ${{ join(fromJson('["Chris","Michael","Mauro"]'), ', ') }} + containsArray: ${{ contains(fromJson('["Chris","Michael"]'), 'chris') }} + presentersString: ${{ join(fromJson('["Chris","Michael"]'), ', ') }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: diff --git a/.github/workflows/09-node.js-matrix.yml b/.github/workflows/09-node.js-matrix.yml index e17ef20..6865227 100644 --- a/.github/workflows/09-node.js-matrix.yml +++ b/.github/workflows/09-node.js-matrix.yml @@ -8,12 +8,10 @@ on: push: branches: [ main ] paths: - - '!**' - 'node-example/**' pull_request: branches: [ main ] paths: - - '!**' - 'node-example/**' defaults: diff --git a/.github/workflows/10-dotnet.yml b/.github/workflows/10-dotnet.yml index d6119fc..7af046f 100644 --- a/.github/workflows/10-dotnet.yml +++ b/.github/workflows/10-dotnet.yml @@ -36,8 +36,12 @@ jobs: restore-keys: | ${{ runner.os }}-nuget- - - name: Build with dotnet - run: dotnet build --configuration Release + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal - name: dotnet publish run: dotnet publish -c Release -o ./webapp diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 63a479a..1e4e9ae 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,12 +5,10 @@ on: push: branches: [ main ] paths: - - '!**' - 'container-example/**' pull_request: branches: [ main ] paths: - - '!**' - 'container-example/**' defaults: @@ -35,4 +33,6 @@ jobs: with: context: container-example push: true - tags: ${{ secrets.DOCKER_USERNAME }}/static-site:latest + tags: | + ${{ secrets.DOCKER_USERNAME }}/static-site:latest + ${{ secrets.DOCKER_USERNAME }}/static-site:${{ env.GITHUB_REV }} diff --git a/dotnet-sample/Program.cs b/dotnet-sample/Program.cs index c4c4613..ef389ad 100644 --- a/dotnet-sample/Program.cs +++ b/dotnet-sample/Program.cs @@ -1,6 +1,6 @@ var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); -app.MapGet("/", () => "Hello FTA Live!"); +app.MapGet("/", () => "Hello Cincinnati Software Craftsmanship!"); app.Run();