Perform building only on master branch
This commit is contained in:
parent
7d63cd19cb
commit
e68f8e9432
@ -28,6 +28,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Log into registry at Gitea
|
||||
uses: docker/login-action@v2
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
with:
|
||||
registry: https://git.fawkes100.de
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
@ -37,12 +38,13 @@ jobs:
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v2
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
with:
|
||||
images: git.fawkes100.de/sebastian/timemanager/timemanager-frontend
|
||||
- name: Build and Push Latest Docker Image
|
||||
id: build-and-push-latest
|
||||
uses: docker/build-push-action@v4
|
||||
if: ${{ github.ref == 'refs/heads/docker-deployment' }}
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
with:
|
||||
context: frontend/.
|
||||
file: frontend/Dockerfile
|
||||
@ -54,21 +56,24 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Log into registry at Gitea
|
||||
uses: docker/login-action@v2
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
with:
|
||||
registry: https://git.fawkes100.de
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
- name: Setup Docker buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v2
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
with:
|
||||
images: git.fawkes100.de/sebastian/timemanager/timemanager-backend
|
||||
- name: Build and Push Latest Docker Image
|
||||
id: build-and-push-latest
|
||||
uses: docker/build-push-action@v4
|
||||
if: ${{ github.ref == 'refs/heads/docker-deployment' }}
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
with:
|
||||
context: backend/.
|
||||
file: backend/Dockerfile
|
||||
|
Loading…
Reference in New Issue
Block a user