изменила ci.yaml
This commit is contained in:
@@ -1,10 +1,50 @@
|
|||||||
- name: Send Telegram notification
|
name: CI
|
||||||
|
run-name: "${{ github.ref_name }} - ${{ github.event_name }} by @${{ github.actor }}"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [develop, main]
|
||||||
|
tags: ["v*"]
|
||||||
|
pull_request:
|
||||||
|
branches: [develop, main]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build & Test
|
||||||
|
uses: ./.github/workflows/build.yaml
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
docker:
|
||||||
|
name: Docker
|
||||||
|
needs: build
|
||||||
|
uses: ./.github/workflows/docker.yaml
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
with:
|
||||||
|
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
telegram-notify:
|
||||||
|
name: Send Telegram Notification
|
||||||
|
needs: docker
|
||||||
|
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Send Telegram notification
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||||
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
VERSION: ${{ inputs.version }}
|
VERSION: ${{ github.ref_name }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
DIGEST: ${{ inputs.image-digest }}
|
DIGEST: ${{ needs.docker.outputs.image-digest }}
|
||||||
run: |
|
run: |
|
||||||
RELEASE_URL="https://github.com/${REPO}/releases/tag/${VERSION}"
|
RELEASE_URL="https://github.com/${REPO}/releases/tag/${VERSION}"
|
||||||
MSG="*${REPO}* - released *${VERSION}*"
|
MSG="*${REPO}* - released *${VERSION}*"
|
||||||
|
|||||||
Reference in New Issue
Block a user