Update and rename LICENSE to LICENSE.md #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD | |
on: | |
push: | |
branches: [ master ] | |
# - '*' | |
pull_request: | |
# branches: [ master ] | |
jobs: | |
build: | |
name: Building image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore ./src/ | |
- name: Build | |
run: dotnet build ./src/ --no-restore | |
- name: Test | |
run: dotnet test ./src/ --no-build --verbosity normal | |
- name: Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
# - name: DockerHub login | |
# uses: docker/login-action@v1 | |
# with: | |
# username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./src/Balance-App # Set the context to the project directory | |
file: ./src/Balance-App/Dockerfile # Path to your Dockerfile | |
push: true | |
tags: ghcr.io/nullchefo/balance-app:latest |