Skip to content

Commit

Permalink
Updated build config
Browse files Browse the repository at this point in the history
  • Loading branch information
nvoxland committed Dec 5, 2020
1 parent d2fc474 commit 7db3806
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build.yml
Expand Up @@ -2,9 +2,9 @@ name: Build

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:

Expand Down Expand Up @@ -59,10 +59,20 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.PACKAGE_PAT }}

- name: Docker Build and Push
- name: Docker Build and Push (PR)
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v2
with:
file: out/builder_image/Dockerfile
context: out/builder_image
push: true
tags: ghcr.io/ruckstack/ruckstack:${{ format(github.head_ref, 'refs/heads/', '') }}
tags: ghcr.io/ruckstack/ruckstack:dev-${{ format(github.head_ref, 'refs/heads/', '') }}

- name: Docker Build and Push (Main)
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v2
with:
file: out/builder_image/Dockerfile
context: out/builder_image
push: true
tags: ghcr.io/ruckstack/ruckstack:latest

0 comments on commit 7db3806

Please sign in to comment.