Commit 14e90373 authored by dmitriysafronov's avatar dmitriysafronov
Browse files

ci: update from template

parent f8450020
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
---

name: Lint

"on":
@@ -20,6 +19,8 @@ jobs:
  test:
    name: lint
    runs-on: ubuntu-latest
    permissions:
      contents: read

    continue-on-error: ${{ matrix.experimental }}
    strategy:
+0 −49
Original line number Diff line number Diff line
name: Push [create tag]
"on":
  push:
    branches:
      - main
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: false
jobs:
  merge:
    name: Push [create tag]
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        if: "${{ ! startsWith(github.event.head_commit.message, 'docs: update changelog for ') }}"
        uses: actions/checkout@v5.0.0
        with:
          token: ${{ secrets.PAT }}
          fetch-depth: 0

      - name: Get Next Version
        if: "${{ ! startsWith(github.event.head_commit.message, 'docs: update changelog for ') }}"
        id: semver
        uses: ietf-tools/semver-action@v1.10.2
        with:
          token: ${{ github.token }}
          branch: main
          noVersionBumpBehavior: silent
          noNewCommitBehavior: silent

      - name: Update CHANGELOG.md
        if: "${{ ! startsWith(github.event.head_commit.message, 'docs: update changelog for ') && steps.semver.outputs.next != '' }}"
        uses: orhun/git-cliff-action@v4
        with:
          config: .cliff.git.toml
          args: --tag ${{ steps.semver.outputs.next }}
        env:
          OUTPUT: CHANGELOG.md

      - uses: EndBug/add-and-commit@v9.1.4
        if: "${{ ! startsWith(github.event.head_commit.message, 'docs: update changelog for ') && steps.semver.outputs.next != '' }}"
        with:
          add: 'CHANGELOG.md'
          commit: --signoff
          default_author: github_actor
          fetch: true
          message: 'docs: update changelog for ${{ steps.semver.outputs.next }}'
          tag: '${{ steps.semver.outputs.next }} --force'
          tag_push: '--force'
+26 −0
Original line number Diff line number Diff line
name: Push [rebase]
---
name: "Rebase"

"on":
  push:
    branches:
      - main

concurrency:
  group: push-rebase-main
  cancel-in-progress: true

jobs:
  rebase:
    name: Push [rebase]
    name: "Rebase"
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
      contents: write
    steps:
      - name: "Rebase all Dependabot's pull requests on every push to the main branch"
        uses: bbeesley/gha-auto-dependabot-rebase@v1.5.196
        env:
          GITHUB_TOKEN: ${{ secrets.PAT }}
      - name: "Rebase all users' pull requests on release push to the main branch"
      - name: "Rebase all non-draft non-dependencies pull requests"
        uses: peter-evans/rebase@v3.1.0
        with:
          base: main
          exclude-drafts: true
          exclude-labels: |
            no-rebase
            dependencies
        if: "${{ startsWith(github.event.head_commit.message, 'docs: update changelog for ') }}"
          exclude-labels: dependencies
+33 −0
Original line number Diff line number Diff line
---
name: Release

"on":
  push:
    branches:
      - main

jobs:
  release:
    name: "Release"
    runs-on: ubuntu-latest
    permissions:
      contents: write
    concurrency:
      group: semantic-release
      cancel-in-progress: false
    steps:
      - name: Checkout
        uses: actions/checkout@v5
        with:
          fetch-depth: 0
          token: ${{ secrets.SEMANTIC_RELEASE_TOKEN || secrets.GITHUB_TOKEN }}

      - name: Semantic release
        run: |
          docker run --rm \
            --user 1001 \
            -v ${{ github.workspace }}:/workspace \
            -w /workspace \
            -e GITHUB_TOKEN=${{ secrets.SEMANTIC_RELEASE_TOKEN || secrets.GITHUB_TOKEN }} \
            -e CI=true \
            ghcr.io/disafronov/semantic-release:latest
+6 −3
Original line number Diff line number Diff line
---
name: Update from template

"on":
  schedule:
    - cron: "00 00 * * *"
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: false

jobs:
  merge:
    name: Update from template
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Checkout
        uses: actions/checkout@v5.0.0
        with:
          token: ${{ secrets.PAT }}
          fetch-depth: 0

      - name: Run update script
        run: bash update.sh
Loading