Skip to content

Merge pull request #594 from louisaxel-ambroise/dependabot/nuget/MSTe… #343

Merge pull request #594 from louisaxel-ambroise/dependabot/nuget/MSTe…

Merge pull request #594 from louisaxel-ambroise/dependabot/nuget/MSTe… #343

Workflow file for this run

name: Package
on:
release:
types: [published]
push:
branches:
- 'main'
workflow_dispatch:
permissions:
packages: write
env:
REPO: louisaxel-ambroise/epcis
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0'
include-prerelease: True
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Development Docker image
if: ${{ github.event.release.tag_name == '' }}
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
tags: |
ghcr.io/${{ env.REPO }}:develop
- name: Build and push Release Docker image
if: ${{ github.event.release.tag_name != '' }}
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
tags: |
ghcr.io/${{ env.REPO }}:${{ github.event.release.tag_name }}
ghcr.io/${{ env.REPO }}:latest