Files
dakiny-bot/.gitea/workflows/build_develop.yml
T
imcompiling bbcb4e4dff
build_latest / build (push) Failing after 25s
Add a fail notification to builds.
2024-05-16 21:59:34 -04:00

44 lines
1.4 KiB
YAML

name: build_develop
on:
push:
branches:
- '*'
- '!main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Docker
uses: https://github.com/papodaca/install-docker-action@v1
- name: Log into container registry
uses: docker/login-action@v2
with:
registry: gitea.cheezers.org
username: imcompiling
password: ${{ secrets.PASSWORD }}
- name: set env
run: echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
- name: Build Docker Image
run: docker build -t gitea.cheezers.org/imcompiling/dakiny-bot:${{env.GIT_BRANCH}} .
- name: Push Docker Image
run: docker push gitea.cheezers.org/imcompiling/dakiny-bot:${{env.GIT_BRANCH}}
- name: Send mail
if: failure()
uses: https://github.com/dawidd6/action-send-mail@v3
with:
to: ${{ secrets.MAIL_TO }}
from: Gitea <gitea@hostname>
subject: ${{ gitea.repository }} ${{gitea.workflow}} ${{ job.status }}
priority: high
convert_markdown: true
html_body: |
### Job ${{ job.status }}
${{ github.repository }}: [${{ github.ref }}@${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/actions)