Skip to content

Commit

Permalink
Add Workflows for other branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Hesketh committed Feb 21, 2024
1 parent a23745e commit 8d80dae
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: docker-tagged

on:
push:
tags:
- '**'
branches-ignore:
- 'main'

jobs:
docker:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERUSER }}
password: ${{ secrets.DOCKERPASSWORD }}
registry: ${{ secrets.DOCKERREGISTRY }}
- name: Restore dependencies
run: dotnet restore
- name: Publish Website
run: dotnet publish Website/Website.csproj --os linux --arch x64 -c Release -p:PublishProfile=DefaultContainer -p:ContainerRegistry=${{ secrets.DOCKERREGISTRY }} -p:ContainerRepository=mecatol_archives_website -p:ContainerImageTags=${{ github.ref_name }}
- name: Publish API
run: dotnet publish API/API.csproj --os linux --arch x64 -c Release -p:PublishProfile=DefaultContainer -p:ContainerRegistry=${{ secrets.DOCKERREGISTRY }} -p:ContainerRepository=mecatol_archives_api -p:ContainerImageTags=${{ github.ref_name }}
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: ci
name: docker-latest

on:
push:
branches:
- 'main'

jobs:
docker:
docker-latest:
runs-on: windows-latest
steps:
- name: Checkout
Expand All @@ -20,6 +20,6 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Publish Website
run: dotnet publish Website/Website.csproj --os linux --arch x64 -c Release -p:PublishProfile=DefaultContainer -p:ContainerRegistry=${{ secrets.DOCKERREGISTRY }} -p:ContainerRepository=mecatol_archives_website
run: dotnet publish Website/Website.csproj --os linux --arch x64 -c Release -p:PublishProfile=DefaultContainer -p:ContainerRegistry=${{ secrets.DOCKERREGISTRY }} -p:ContainerRepository=mecatol_archives_website -p:ContainerImageTag=latest
- name: Publish API
run: dotnet publish API/API.csproj --os linux --arch x64 -c Release -p:PublishProfile=DefaultContainer -p:ContainerRegistry=${{ secrets.DOCKERREGISTRY }} -p:ContainerRepository=mecatol_archives_api
run: dotnet publish API/API.csproj --os linux --arch x64 -c Release -p:PublishProfile=DefaultContainer -p:ContainerRegistry=${{ secrets.DOCKERREGISTRY }} -p:ContainerRepository=mecatol_archives_api -p:ContainerImageTag=latest

0 comments on commit 8d80dae

Please sign in to comment.