Dockerize and automate
This commit is contained in:
38
.gitea/workflows/build-image.yaml
Normal file
38
.gitea/workflows/build-image.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
name: Build and Push Prod Image
|
||||
run-name: ${{ gitea.ref }} Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
Build-Prod-Image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Docker
|
||||
run: curl -fsSL https://get.docker.com | sh
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log into Gitea
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: gitea.shrukanslab.xyz
|
||||
username: ${{ secrets.ROBOT_USERNAME }}
|
||||
password: ${{ secrets.ROBOT_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
gitea.shrukanslab.xyz/tj-central-bank/backend:latest
|
||||
|
||||
- name: Logout from Docker Registry
|
||||
run: docker logout gitea.shrukanslab.xyz
|
||||
Reference in New Issue
Block a user