Files
sorvor-back/.gitea/workflows/backend.yaml
Thanu Poptiphueng decd9a6945
Some checks failed
backend-admin-action / build-image (push) Failing after 38s
backend-action / build-image (push) Successful in 1h53m1s
increase timeout
2024-05-27 11:30:13 +07:00

35 lines
1.0 KiB
YAML

name: backend-action
run-name: ${{ gitea.actor }} is building docker image 🚀
on: [push]
jobs:
build-image:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: gitea.cognizata.com
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64
tags: gitea.cognizata.com/atapy/sorvor:latest
target: app
- name: update server
uses: https://github.com/appleboy/ssh-action@v1.0.3
with:
host: 46.102.174.196
username: root
key: ${{ secrets.SORVOR_KEY }}
port: 22
script: "docker compose pull && docker compose up -d"
command_timeout: 30h
- run: echo "🍏 This job's status is ${{ job.status }}."