Files
vegasco/.gitea/workflows/build.yaml
ThompsonNye d19d68f5a2
Some checks failed
Build Vegasco Server / build (push) Failing after 2m24s
Setup docker in pipeline
2024-08-23 18:35:51 +02:00

66 lines
1.9 KiB
YAML

name: Build Vegasco Server
on:
push:
pull_request:
workflow_run:
types:
- requested
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install docker
uses: papodaca/install-docker-action@main
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Check out repository code
uses: actions/checkout@v3
- name: Build
run: dotnet build
- name: Test
run: dotnet test --filter FullyQualifiedName!~System
### Report via telegram
- name: Get 8 characters of commit id
uses: bhowell2/github-substring-action@1.0.2
id: commit-hash-short
if: ${{ always() }}
with:
value: ${{ gitea.event.commits[0].id }}
length_from_start: 8
- name: Clean commit message
uses: mad9000/actions-find-and-replace-string@3
id: commit-message-clean
with:
source: ${{ gitea.event.commits[0].message }}
find: '\n'
replace: ''
- name: Telegram notification
uses: appleboy/telegram-action@master
if: ${{ always() }}
env:
STATUS_ICON: ${{ job.status == 'success' && '✅' || job.status == 'failure' && '❌' || '❕' }}
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
message: |
${{ env.STATUS_ICON }} Build #${{ gitea.run_number }} of `${{ gitea.repository }}`: ${{ job.status }}
📝 Commit by ${{ gitea.actor }} on `${{ gitea.ref_name }}`:
[${{ steps.commit-message-clean.outputs.value }} - ${{ steps.commit-hash-short.outputs.substring }}](${{ gitea.event.commits[0].url }})
🌐 ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}