изменила ci.yaml
This commit is contained in:
+19
-31
@@ -1,31 +1,19 @@
|
|||||||
name: CI
|
- name: Send Telegram notification
|
||||||
run-name: "${{ github.ref_name }} - ${{ github.event_name }} by @${{ github.actor }}"
|
env:
|
||||||
|
TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||||
on:
|
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
push:
|
VERSION: ${{ inputs.version }}
|
||||||
branches: [develop, main]
|
REPO: ${{ github.repository }}
|
||||||
tags: ["v*"]
|
DIGEST: ${{ inputs.image-digest }}
|
||||||
pull_request:
|
run: |
|
||||||
branches: [develop, main]
|
RELEASE_URL="https://github.com/${REPO}/releases/tag/${VERSION}"
|
||||||
|
MSG="*${REPO}* - released *${VERSION}*"
|
||||||
concurrency:
|
MSG="${MSG}%0A🔗 [Release notes](${RELEASE_URL})"
|
||||||
group: ci-${{ github.workflow }}-${{ github.ref }}
|
if [ -n "${DIGEST}" ]; then
|
||||||
cancel-in-progress: true
|
MSG="${MSG}%0AImage: \`ghcr.io/${REPO}@${DIGEST}\`"
|
||||||
|
fi
|
||||||
jobs:
|
curl -sf -X POST \
|
||||||
build:
|
"https://api.telegram.org/bot${TOKEN}/sendMessage" \
|
||||||
name: Build & Test
|
-d "chat_id=${CHAT_ID}" \
|
||||||
uses: ./.github/workflows/build.yaml
|
-d "parse_mode=Markdown" \
|
||||||
permissions:
|
-d "text=${MSG}"
|
||||||
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user