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
9 changes: 9 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,12 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Check scripts permissions.
run: make check-scripts-permissions

common-files:
name: Common Files
runs-on: ubuntu-24.04
steps:
- name: Checkout code.
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Check common files.
run: make check-common-files
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Nix .gitignore
# Generated by direnv & Nix.
.direnv/
.direnv
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ check-shell-linting:
.PHONY: check-scripts-permissions
check-scripts-permissions:
./ci/check-scripts-permissions.sh

.PHONY: check-common-files
check-common-files:
./ci/check-common-files.sh
1 change: 1 addition & 0 deletions basic/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
18 changes: 18 additions & 0 deletions basic/.github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:best-practices"
],
"automerge": true,
"github-actions": {
"enabled": false
},
"nix": {
"enabled": true,
"lockFileMaintenance": {
"enabled": true,
"commitMessageAction": "update",
"commitMessageTopic": "Nix flake lock"
}
}
}
26 changes: 26 additions & 0 deletions basic/.github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Conventional Commits

on:
pull_request:
types: [opened, edited, synchronize, reopened]

permissions:
contents: read

jobs:
linting:
name: Linting
runs-on: ubuntu-24.04
container:
image: ghcr.io/developerc286/conventional_commits_linter:0.17.1@sha256:f1b947937ee884ba7f886d04939cd4858f9aeafb50dcf94925a516c50e43021b
steps:
- name: Checkout code.
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Check Conventional Commits linting.
env:
PR_TITLE: ${{ github.event.pull_request.title }}
PR_BODY: ${{ github.event.pull_request.body }}
run: printf '%s\n\n%s' "$PR_TITLE" "$PR_BODY" | conventional_commits_linter -
21 changes: 21 additions & 0 deletions basic/.github/workflows/git-history.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Git History

on: pull_request

permissions:
contents: read

jobs:
clean:
name: Clean
runs-on: ubuntu-24.04
container:
image: ghcr.io/developerc286/clean_git_history:1.1.6@sha256:93fd9c692f6e629956921b8d068ccad33760882b6e0c6d4d32cd963380aec25f
steps:
- name: Checkout code.
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Check clean Git history.
run: clean_git_history "origin/${{ github.base_ref }}"
35 changes: 35 additions & 0 deletions basic/.github/workflows/github-actions-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: GitHub Actions Workflows

on: pull_request

permissions:
contents: read

jobs:
formatting:
name: Formatting
runs-on: ${{ matrix.architecture }}
strategy:
matrix:
architecture: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- name: Checkout code.
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Nix.
uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
- name: Check formatting.
run: nix develop -c make check-yaml-formatting

linting:
name: Linting
runs-on: ${{ matrix.architecture }}
strategy:
matrix:
architecture: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- name: Checkout code.
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Nix.
uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
- name: Check GitHub Actions workflows linting.
run: nix develop -c make check-github-actions-workflows-linting
19 changes: 19 additions & 0 deletions basic/.github/workflows/mirroring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mirroring

on: [push, delete]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}

jobs:
gitlab:
name: GitLab
runs-on: ubuntu-24.04
steps:
- name: Checkout code.
run: git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" "${GITHUB_WORKSPACE}"
- name: Mirroring.
run: git push --mirror "https://oauth2:${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}@gitlab.com/DeveloperC/${{ github.event.repository.name }}"
19 changes: 19 additions & 0 deletions basic/.github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Continuous Delivery (CD)

on:
push:
branches:
- main

# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-24.04
steps:
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
with:
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
3 changes: 3 additions & 0 deletions basic/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Nix .gitignore
# Generated by direnv & Nix.
.direnv
3 changes: 3 additions & 0 deletions basic/.yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
formatter:
type: basic
retain_line_breaks: true
Loading