Skip to content

Commit

Permalink
Update hw25-ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vyefremov committed Jun 23, 2024
1 parent c55ec9e commit 671f62b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/hw25-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ on:
- 'hw25-ci-cd/**'

jobs:
version:
name: Version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool
- name: Run GitVersion
id: gitversion
run: |
dotnet-gitversion /output buildserver /outputfile version.json
echo "::set-output name=version::$(cat version.json | jq -r '.MajorMinorPatchTag')"
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -50,3 +68,29 @@ jobs:
- name: Run Integration Tests
working-directory: './hw25-ci-cd/src'
run: dotnet test --filter FullyQualifiedName\!~UnitTests

# build-and-push-docker-image:
# name: Build and Push Docker Image
# needs:
# - unit-tests
# - integration-tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: Login to Docker Hub
# uses: docker/login-action@v4
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Build Docker Image
# working-directory: './hw25-ci-cd/src/webapi'
# run: docker build -t hw25-webapi .
#
# - name: Tag Docker Image
# run: docker tag hw25-webapi ${{ secrets.DOCKER_USERNAME }}/hw25-webapi
#
# - name: Push Docker Image
# run: docker push ${{ secrets.DOCKER_USERNAME }}/hw25-webapi

0 comments on commit 671f62b

Please sign in to comment.