Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .copier-answers.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: c91d4da
_src_path: gh:athackst/ci
automerge_mode: poll
bump_script_path: ''
do_releases: true
release_template: '## What''s changed


$CHANGES

'
site_generator: none
118 changes: 118 additions & 0 deletions .github/ci-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# This file is generated from athackst/ci/template/.github/ci-config.yml.jinja.
# Do not edit directly; update the template instead.

name-template: "Release v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
template-file: ".github/release_template.md"
categories:
- title: ':zap: Breaking'
labels:
- 'breaking'
- 'major'
- title: ':rocket: New'
labels:
- 'feature'
- 'enhancement'
- title: ':bug: Bug Fixes'
labels:
- 'bug'
- 'fix'
- title: ':toolbox: Maintenance'
labels:
- 'maintenance'
- 'devops'
- title: ':memo: Documentation'
labels:
- 'docs'
- 'documentation'
- title: 'Dependency Updates'
label: 'dependencies'
collapse-after: 3

exclude-labels:
- 'skip-changelog'

version-resolver:
major:
labels:
- 'breaking'
- 'major'
minor:
labels:
- 'feature'
- 'minor'
- 'enhancement'
patch:
labels:
- 'bug'
- 'fix'
- 'maintenance'
- 'docs'
- 'documentation'
- 'devops'
- 'dependencies'
- 'security'

labels:
breaking:
- head-branch: ["^major", "^break"]
- description: "Breaking or major-version change"
- color: "#7f1d1d"

bug:
- head-branch: ['^fix', '^bug']
- description: "Something isn't working"
- color: "#d73a4a"

enhancement:
- head-branch: ["^feat", "^new", "^enhance"]
- description: "New feature or request"
- color: "#0f766e"

maintenance:
- head-branch: ['^chore', '^maint', '^noop', '^no-op', '^upkeep', '^dev']
- changed-files:
- any-glob-to-any-file: [".github/**", ".vscode/**"]
- description: "Non-behavior related change"
- color: "#0ea5e9"

dependencies:
- head-branch: ['^deps', '^dependencies']
- description: "Pull requests that update a dependency file"
- color: "#1d4ed8"

documentation:
- changed-files:
- any-glob-to-any-file: "**/*.md"
- head-branch: ["^doc"]
- description: "Improvements or additions to documentation"
- color: "#64748b"

automerge:
- head-branch: ['^dependabot/']
- description: "Automatically merge"
- color: "#eab308"

good first issue:
- description: "Good for newcomers"
- color: "#c4b5fd"

help wanted:
- description: "Extra attention is needed"
- color: "#db2777"

question:
- description: "Further information is requested"
- color: "#7e22ce"

duplicate:
- description: "This is a duplicate"
- color: "#cbd5e1"

invalid:
- description: "This doesn't seem right"
- color: "#a3a3a3"

wontfix:
- description: "This will not be worked on"
- color: "#78716c"
5 changes: 5 additions & 0 deletions .github/release_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- This file is generated from .copier-answers.ci.yml. Do not edit directly; update the template instead. -->

## What's changed

$CHANGES
30 changes: 30 additions & 0 deletions .github/workflows/ci_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

# This file is generated from athackst/ci/template/.github/workflows/ci_update.yml.jinja.
# Do not edit directly; update the template instead.

name: CI Update

on:
schedule:
- cron: "0 15 * * *"
workflow_dispatch:

concurrency:
group: "ci-update-${{ github.ref }}"
cancel-in-progress: false

jobs:
ci-update:
permissions:
contents: write
pull-requests: write
# Required for creating an issue if the workflow fails
issues: write
# Required in this environment to allow PRs that modify .github/workflows/*.
actions: write
uses: athackst/ci/.github/workflows/ci_updater.yml@main
with:
create-pr: true
automerge: true
secrets:
token: ${{ secrets.CI_BOT_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/pr_automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is generated from athackst/ci/template/.github/workflows/pr_automerge.yml.jinja.
# Do not edit directly; update the template instead.

name: PR Automerge

on:
pull_request_target:
types:
- labeled
- unlabeled

concurrency:
group: "pr-automerge-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: false

jobs:
pr-automerge:
if: ${{ github.event.pull_request.state == 'open' }}
permissions:
contents: write
pull-requests: write
checks: read
uses: athackst/ci/.github/workflows/automerge.yml@main
with:
automerge-mode: poll
secrets:
token: ${{ secrets.CI_BOT_TOKEN }}
16 changes: 16 additions & 0 deletions .github/workflows/pr_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is generated from athackst/ci/template/.github/workflows/pr_labeler.yml.jinja.
# Do not edit directly; update the template instead.

name: PR Labeler

on:
pull_request_target:

jobs:
pr-label:
permissions:
contents: read
pull-requests: write
uses: athackst/ci/.github/workflows/labeler.yml@main
secrets:
token: ${{ secrets.CI_BOT_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/release_draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is generated from athackst/ci/template/.github/workflows/release_draft.yml.jinja.
# Do not edit directly; update the template instead.
name: Release Draft

on:
push:
branches: [main]
workflow_dispatch:

jobs:
release-draft:
permissions:
contents: write
pull-requests: read
uses: athackst/ci/.github/workflows/release_drafter.yml@main
with:
draft-release-id: ${{ vars.DRAFT_RELEASE_ID }}
secrets:
token: ${{ secrets.CI_BOT_TOKEN }}

persist-draft-id:
needs:
- release-draft
permissions:
actions: write
runs-on: ubuntu-latest
steps:
- name: Persist draft release id
shell: bash
env:
GH_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
RELEASE_ID: ${{ needs.release-draft.outputs.id }}
run: |
set -euo pipefail
gh variable set DRAFT_RELEASE_ID --body "$RELEASE_ID" --repo "${{ github.repository }}"
24 changes: 24 additions & 0 deletions .github/workflows/setup_labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is generated from athackst/ci/template/.github/workflows/setup_labels.yml.jinja.
# Do not edit directly; update the template instead.

name: Setup Labels

on:
push:
branches: [main]
paths:
- ".github/ci-config.yml"
workflow_dispatch:

jobs:
setup-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Setup labels
id: setup-labels
uses: athackst/ci/actions/setup-labels@main
with:
github-token: ${{ secrets.CI_BOT_TOKEN || github.token }}
configuration-path: .github/ci-config.yml
Loading