Skip to content

Commit aa75d3d

Browse files
committed
feat: add initial github workflow
Signed-off-by: Brian McGee <[email protected]>
1 parent 28ec6f8 commit aa75d3d

File tree

4 files changed

+185
-0
lines changed

4 files changed

+185
-0
lines changed

.github/CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
By contributing to this project, you hereby acknowledge that you already read [Contributing](../docs/contributing.md)
2+
guideline, and you agree to the Developer Certificate of Origin (DCO). This document is a simple statement that you, as
3+
a contributor, have the legal right to submit the contribution.
4+
5+
See the [Developer Certificate of Origin](https://developercertificate.org/) file for details.

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/settings.yml

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
repository:
2+
# See https://developer.github.com/v3/repos/#edit for all available settings.
3+
4+
# The name of the repository. Changing this will rename the repository
5+
name: treefmt.go
6+
7+
# A short description of the repository that will show up on GitHub
8+
description: one CLI to format your repo
9+
10+
# A URL with more information about the repository
11+
homepage: "https://numtide.github.io/treefmt.go/"
12+
13+
# A comma-separated list of topics to set on the repository
14+
topics: "cli, formatter, unifies"
15+
16+
# Either `true` to make the repository private, or `false` to make it public.
17+
private: false
18+
19+
# Either `true` to enable issues for this repository, `false` to disable them.
20+
has_issues: true
21+
22+
# Either `true` to enable projects for this repository, or `false` to disable them.
23+
# If projects are disabled for the organization, passing `true` will cause an API error.
24+
has_projects: false
25+
26+
# Either `true` to enable the wiki for this repository, `false` to disable it.
27+
has_wiki: true
28+
29+
# Either `true` to enable downloads for this repository, `false` to disable them.
30+
has_downloads: false
31+
32+
# Updates the default branch for this repository.
33+
default_branch: main
34+
35+
# Either `true` to allow squash-merging pull requests, or `false` to prevent
36+
# squash-merging.
37+
allow_squash_merge: true
38+
39+
# Either `true` to allow merging pull requests with a merge commit, or `false`
40+
# to prevent merging pull requests with merge commits.
41+
allow_merge_commit: true
42+
43+
# Either `true` to allow rebase-merging pull requests, or `false` to prevent
44+
# rebase-merging.
45+
allow_rebase_merge: true
46+
47+
# Either `true` to enable automatic deletion of branches on merge, or `false` to disable
48+
delete_branch_on_merge: true
49+
50+
# Either `true` to enable automated security fixes, or `false` to disable
51+
# automated security fixes.
52+
enable_automated_security_fixes: true
53+
54+
# Either `true` to enable vulnerability alerts, or `false` to disable
55+
# vulnerability alerts.
56+
enable_vulnerability_alerts: true
57+
58+
# Labels: define labels for Issues and Pull Requests
59+
#
60+
labels:
61+
# NOTE: leave that up to the https://github.com/numtide/.github repo
62+
# - name: bug
63+
# color: CC0000
64+
# description: An issue with the system 🐛.
65+
66+
# - name: feature
67+
# # If including a `#`, make sure to wrap it with quotes!
68+
# color: '#336699'
69+
# description: New functionality.
70+
71+
# - name: Help Wanted
72+
# # Provide a new name to rename an existing label
73+
# new_name: first-timers-only
74+
75+
# Milestones: define milestones for Issues and Pull Requests
76+
milestones:
77+
# - title: milestone-title
78+
# description: milestone-description
79+
# # The state of the milestone. Either `open` or `closed`
80+
# state: open
81+
82+
# Collaborators: give specific users access to this repository.
83+
# See https://docs.github.com/en/rest/reference/repos#add-a-repository-collaborator for available options
84+
collaborators:
85+
- username: basile-henry
86+
# Note: `permission` is only valid on organization-owned repositories.
87+
# The permission to grant the collaborator. Can be one of:
88+
# * `pull` - can pull, but not push to or administer this repository.
89+
# * `push` - can pull and push, but not administer this repository.
90+
# * `admin` - can pull, push and administer this repository.
91+
# * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
92+
# * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.
93+
permission: push
94+
95+
# See https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions for available options
96+
teams:
97+
- name: network
98+
# The permission to grant the team. Can be one of:
99+
# * `pull` - can pull, but not push to or administer this repository.
100+
# * `push` - can pull and push, but not administer this repository.
101+
# * `admin` - can pull, push and administer this repository.
102+
# * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
103+
# * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.
104+
permission: maintain
105+
106+
branches:
107+
- name: main
108+
# https://docs.github.com/en/rest/reference/repos#update-branch-protection
109+
# Branch Protection settings. Set to null to disable
110+
protection:
111+
# Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
112+
required_pull_request_reviews:
113+
# # The number of approvals required. (1-6)
114+
# required_approving_review_count: 1
115+
# # Dismiss approved reviews automatically when a new commit is pushed.
116+
# dismiss_stale_reviews: true
117+
# # Blocks merge until code owners have reviewed.
118+
# require_code_owner_reviews: true
119+
# # Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
120+
# dismissal_restrictions:
121+
# users: []
122+
# teams: []
123+
# Required. Require status checks to pass before merging. Set to null to disable
124+
required_status_checks:
125+
# Required. Require branches to be up to date before merging.
126+
strict: true
127+
# Required. The list of status checks to require in order to merge into this branch
128+
contexts: []
129+
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
130+
enforce_admins: false
131+
# Disabled for mergify to work
132+
required_linear_history: false
133+
# Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable.
134+
restrictions:
135+
apps: ["mergify"]
136+
users: []
137+
teams: []

.github/workflows/gh-pages.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Build and deploy MkDocs to gh-pages for main branch
2+
name: gh-pages
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- staging
8+
- trying
9+
pull_request:
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
gh-pages:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: cachix/install-nix-action@v25
21+
- uses: cachix/cachix-action@v14
22+
with:
23+
name: numtide
24+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
25+
26+
- name: Build the docs
27+
id: build
28+
run: |
29+
nix build .#docs
30+
echo "result=$(readlink ./result)" >> $GITHUB_OUTPUT
31+
32+
- name: Deploy
33+
uses: peaceiris/actions-gh-pages@v3
34+
if: github.ref == 'refs/heads/main'
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: "${{ steps.build.outputs.result }}/"

0 commit comments

Comments
 (0)