add workflow for building containers
This commit is contained in:
34
.gitea/workflows/build-container-backend.yaml
Normal file
34
.gitea/workflows/build-container-backend.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: build-container-backend
|
||||
|
||||
on:
|
||||
workflow-dispatch:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build-x86_64:
|
||||
runs-on: hardware-x86_64
|
||||
steps:
|
||||
- name: Pull repository
|
||||
run: |
|
||||
git init
|
||||
git remote add gitea http://10.1.1.1:3000/hasslesstech/sdlc-project
|
||||
git pull
|
||||
git checkout gitea/master
|
||||
- name: Build docker image
|
||||
run: docker build backend/ -f backend/Dockerfile-x86_64 -t 10.5.1.5:5000/hasslesstech/sdlc-container
|
||||
- name: Push docker image to registry
|
||||
run: docker push 10.5.1.5:5000/hasslesstech/sdlc-container
|
||||
|
||||
build-armv7:
|
||||
runs-on: hardware-armv7
|
||||
steps:
|
||||
- name: Pull repository
|
||||
run: |
|
||||
git init
|
||||
git remote add gitea http://10.1.1.1:3000/hasslesstech/sdlc-project
|
||||
git pull
|
||||
git checkout gitea/master
|
||||
- name: Build docker image
|
||||
run: docker build backend/ -f backend/Dockerfile-armv7 -t 10.5.1.5:5000/hasslesstech/sdlc-container
|
||||
- name: Push docker image to registry
|
||||
run: docker push 10.5.1.5:5000/hasslesstech/sdlc-container
|
||||
Reference in New Issue
Block a user