Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bertt authored Sep 22, 2023
1 parent 250c34b commit 311fbc7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ on:

jobs:
build:

runs-on: ubuntu-latest
env:
PUSH_PACKAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
Expand All @@ -22,6 +18,11 @@ jobs:
- name: Build with dotnet
working-directory: src
run: dotnet build --configuration Release
publishdocker:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build ./src --file ./src/Dockerfile --tag geodan/pg2b3dm:latest
Expand All @@ -30,6 +31,5 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- if: ${{ env.PUSH_PACKAGES }}
name: Publish the Docker image
- name: Publish the Docker image
run: docker push geodan/pg2b3dm:latest

0 comments on commit 311fbc7

Please sign in to comment.