Docker and Workflow
This commit is contained in:
52
.gitea/workflows/build-and-push.yml
Normal file
52
.gitea/workflows/build-and-push.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Build and Push Docker Images
|
||||
|
||||
# This workflow runs on every push to any branch.
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-and-push-backend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.out.jafre.li
|
||||
username: ${{ vars.USER }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
|
||||
- name: Build and push backend image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./backend
|
||||
push: true
|
||||
tags: |
|
||||
git.out.jafre.li/jafreli/dashboard-backend:${{ gitea.ref_name }}
|
||||
git.out.jafre.li/jafreli/dashboard-backend:latest
|
||||
|
||||
build-and-push-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.out.jafre.li
|
||||
username: ${{ vars.USER }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
|
||||
- name: Build and push frontend image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./frontend
|
||||
push: true
|
||||
tags: |
|
||||
git.out.jafre.li/jafreli/dashboard-frontend:${{ gitea.ref_name }}
|
||||
git.out.jafre.li/jafreli/dashboard-frontend:latest
|
||||
Reference in New Issue
Block a user