Skip to content

Commit

Permalink
🔧 Only push to dockerHub when on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiash98 committed Sep 14, 2024
1 parent c6adf8a commit de6103c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Frontend Build and Push to DockerHub
name: Build & push Docker image (if main branch)

on:
push:
# branches: ["main"] # Revert to main when merged
branches: ["*"]
pull_request:
# branches: ["main"] # Revert to main when merged
branches: ["*"]

jobs:
Expand All @@ -35,7 +30,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name == 'push' }}
push: ${{ github.ref == 'refs/heads/main' }}
tags: fribyte/boskonf.no:latest
build-args: |
APP_BUILD_DATE=${{ github.event.repository.updated_at}}

0 comments on commit de6103c

Please sign in to comment.