Unverified Commit 79d496d2 authored by Dmitrii Safronov's avatar Dmitrii Safronov Committed by GitHub
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

.ansible-lint

0 → 100644
+3 −0
Original line number Diff line number Diff line
---
warn_list:
  - yaml[line-length]

.github/dependabot.yml

0 → 100644
+14 −0
Original line number Diff line number Diff line
---
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/.github/workflows"
    schedule:
      interval: "daily"
    labels:
      - "dependencies"
+66 −0
Original line number Diff line number Diff line
---
name: Breakage

"on":
  pull_request:
    branches:
      - main
  schedule:
    # Run on the 10th of each month at noon.
    - cron: "00 12 10 * *"
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:

  breakage:
    name: Breakage
    runs-on: ubuntu-latest
    permissions:
      contents: read

    continue-on-error: ${{ matrix.experimental }}
    strategy:
      fail-fast: true
      matrix:
        python: ["3.10", "3.x"]
        ansible: ["9", "latest"]
        experimental: [false]
        include:
          - python: "3.x"
            ansible: "9"
            experimental: true
          - python: "3.x"
            ansible: "latest"
            experimental: true
        exclude:
          - python: "3.x"
            ansible: "9"
            experimental: false
          - python: "3.x"
            ansible: "latest"
            experimental: false

    steps:
      - name: Check out the codebase
        uses: actions/checkout@v6

      - name: Set up Python
        uses: actions/setup-python@v6.1.0
        with:
          python-version: "${{ matrix.python }}"
          cache: "pip"
          cache-dependency-path: .requirements/${{ matrix.ansible }}.txt

      - name: Install/upgrade pip, wheel
        run: pip install --upgrade pip wheel

      - name: Install test dependencies
        id: deps
        run: pip install -r .requirements/${{ matrix.ansible }}.txt

      - name: Run ansible-lint
        run: ansible-lint
+28 −0
Original line number Diff line number Diff line
---
name: "Rebase"

"on":
  push:
    branches:
      - main

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

jobs:
  rebase:
    name: "Rebase"
    runs-on: ubuntu-latest
    # Run only on release commits
    if: startsWith(github.event.head_commit.message, 'chore(release):')
    permissions:
      pull-requests: write
      contents: write
    steps:
      - name: "Rebase all non-draft non-dependencies pull requests"
        uses: peter-evans/rebase@v4.0.0
        with:
          base: main
          exclude-drafts: true
          exclude-labels: dependencies
+36 −0
Original line number Diff line number Diff line
---
name: Release

"on":
  push:
    branches:
      - main

jobs:
  release:
    name: "Release"
    runs-on: ubuntu-latest
    # Skip release on release commits to avoid infinite loop
    if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
    permissions:
      contents: write
      pull-requests: write
    concurrency:
      group: semantic-release
      cancel-in-progress: false
    steps:
      - name: Checkout
        uses: actions/checkout@v6
        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