Files
zont-exporter/.gitea/workflows/main.yml
T
energys b37ce9c5fd
Build and Push / maintence (push) Successful in 1s
Build and Push / buildApp (push) Successful in 4s
Build and Push / pushApp (push) Failing after 4s
Update .gitea/workflows/main.yml
2026-09-26 02:25:32 +09:00

39 lines
1.4 KiB
YAML

name: Build and Push
on:
push:
jobs:
maintence:
runs-on: srvdnd
outputs:
date: ${{ steps.date.outputs.date }}
steps:
- name: Get current date
id: date
run: echo "date=$(TZ=":Asia/Yakutsk" date +'%FT%H-%M-%SR')" >> $GITHUB_OUTPUT
buildApp:
needs: [maintence]
runs-on: srvdnd
env:
TAG_NAME: ${{ needs.maintence.outputs.date }}${{ gitea.RUN_ID }}
steps:
- name: Check out repository code
uses: https://git.tlgrf.ru/actions/checkout@v4
- name: Create docker image!
run: docker build -t git.tlgrf.local/${{ gitea.REPOSITORY }}/${{ gitea.REF_NAME }}:$TAG_NAME -t git.tlgrf.ru/${{ gitea.REPOSITORY }}/${{ gitea.REF_NAME }}:$TAG_NAME -t git.tlgrf.ru/${{ gitea.REPOSITORY }}/${{ gitea.REF_NAME }}:latest ./zont-exporter -f ./zont-exporter/Dockerfile
pushApp:
needs: [buildApp, maintence]
runs-on: srvdnd
env:
TAG_NAME: ${{ needs.maintence.outputs.date }}${{ gitea.RUN_ID }}
steps:
- name: Login to git.tlgrf.ru
uses: https://git.tlgrf.ru/actions/docker-login-action@v3
with:
registry: git.tlgrf.ru
username: gitea
password: ${{ secrets.GITEAPASSWORD }}
- name: Push docker image!
run: docker push git.tlgrf.ru/${{ gitea.REPOSITORY }}/${{ gitea.REF_NAME }}:$TAG_NAME && docker push git.tlgrf.ru/${{ gitea.REPOSITORY }}/${{ gitea.REF_NAME }}:latest