Skip to content

Fix path for actions/upload-artifact workflow step. #16

Fix path for actions/upload-artifact workflow step.

Fix path for actions/upload-artifact workflow step. #16

Workflow file for this run

name: ExampleApp-CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v4.1.1
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore
run: dotnet restore --verbosity minimal ./src/ExampleApp.csproj
- name: Build
run: dotnet build --no-restore --configuration Release --verbosity normal ./src/ExampleApp.csproj
- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal ./src/ExampleApp.csproj
- name: Publish
run: dotnet publish --no-build --configuration Release --verbosity normal ./src/ExampleApp.csproj
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ExampleApp
path: ./src/bin/Release/net6.0/publish
- name: Login to DockerHub
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
- name: Build and push to Docker Hub
uses: docker/build-push-action@v5.0.0
with:
context: ./src
file: ./src/Dockerfile
push: true
tags: feliperomero/exampleapp:dev