mirror of
https://github.com/lukaszraczylo/go-telegram.git
synced 2026-10-13 00:47:31 +00:00
* ci(workflows): migrate to shared go-pr and go-release workflows Replace the generic vet, staticcheck, govulncheck, gosec, test and release jobs with the shared go-pr and go-release workflows. Keep the codegen-clean and audit jobs in ci.yml. Add an examples build job and the ci-success aggregator there. Add autoupdate.yaml from the shared go-autoupdate workflow. The release job now runs only on Go source changes and on manual dispatch. The dry-run input and the Bot API note in the tag message no longer exist. * ci(release): gate release on repo checks and export Bot API version Move the codegen-clean, audit and examples jobs into the reusable checks.yml workflow. The ci.yml and release.yml workflows both call it. The release job now needs the checks job. A failed or cancelled check blocks the release. Add workflow-prepare.sh. It appends BOT_API_VERSION to GITHUB_ENV so the GoReleaser header shows the Bot API version. The script does nothing when GITHUB_ENV is unset. * ci(regen): name release.yml in the merge step comments The release now runs from release.yml. The comments still named ci.yml as the workflow that cuts the release.
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: ci
|
|
|
|
# Repo-specific checks run through checks.yml. Generic vet, staticcheck,
|
|
# govulncheck, gosec and tests run in pr.yaml (shared go-pr). Releases run in
|
|
# release.yml (shared go-release), gated by the same checks.yml.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Cancel any in-flight CI runs for the same branch when a new push lands.
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
checks:
|
|
uses: ./.github/workflows/checks.yml
|
|
|
|
# Aggregate gate for the repo-local checks. Keeps the `ci-success` name
|
|
# so an existing branch-protection rule keeps resolving.
|
|
ci-success:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
needs: [checks]
|
|
if: always()
|
|
steps:
|
|
- name: All checks passed
|
|
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
|
|
run: echo "ci-success"
|
|
- name: At least one check failed
|
|
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
|
|
run: |
|
|
echo "Failed/cancelled jobs:"
|
|
echo '${{ toJSON(needs) }}'
|
|
exit 1
|