timemanager/.gitea/workflows/demo.yaml
Sebastian Böckelmann 6c8f216fa5
All checks were successful
Java CI with Maven / build-and-push-frontend (push) Successful in 14s
Java CI with Maven / build-and-push-backend (push) Successful in 10s
Remove Testing code (interfers with commandlinerunner)
2024-03-14 11:25:11 +01:00

63 lines
2.3 KiB
YAML

name: Java CI with Maven
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
build-and-push-frontend:
runs-on: ubuntu-latest
steps:
- 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-frontend
- name: Build and Push Latest Docker Image
id: build-and-push-latest
uses: docker/build-push-action@v4
if: ${{ github.ref == 'refs/heads/master' }}
with:
context: frontend/.
file: frontend/Dockerfile
push: true
tags: git.fawkes100.de/sebastian/timemanager/timemanager-frontend:latest
build-and-push-backend:
runs-on: ubuntu-latest
steps:
- 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/master' }}
with:
context: backend/.
file: backend/Dockerfile
push: true
tags: git.fawkes100.de/sebastian/timemanager/timemanager-backend:latest