Repository navigation
ci: apply the repository settings with the action itself #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6a9dd56
ci: apply the repository settings with the action itself
sbp-bvanb 5bc83bf
fix: pin click and drop redundant quotes in the settings workflow
sbp-bvanb 8e09c46
fix: install click from a hashed requirements file and move docs
sbp-bvanb fec5903
docs: tag the Quickstart example as yaml
sbp-bvanb 9a856d4
fix: drop the dev pin bumps and pin the Quickstart example by SHA
sbp-bvanb 46a5937
fix: install click inside the action from the hashed requirements file
sbp-bvanb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| name: settings | ||
| "on": | ||
| push: | ||
| branches: | ||
| - main | ||
| schedule: | ||
| - cron: 42 6 * * * | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| settings-action: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| # yamllint disable rule:line-length | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: ./ | ||
| env: | ||
| GH_TOKEN: ${{ secrets.SETTINGS_ACTION }} | ||
| with: | ||
| description: Settings Action configures the settings of a GitHub repository. | ||
| project: ${{ github.repository }} | ||
| settings_actions_allowed_actions: selected | ||
| settings_actions_github_owned_allowed: true | ||
| settings_actions_verified_allowed: false | ||
| # mcvs-general-action v0.7.x runs lychee-action and | ||
| # markdownlint-cli2-action as nested actions. | ||
| settings_actions_patterns_allowed: 030/*,schubergphilis/*,zizmorcore/zizmor-action@*,lycheeverse/lychee-action@*,davidanson/markdownlint-cli2-action@* | ||
| settings_actions_require_sha_pinning: true | ||
| settings_default_workflow_permissions: read | ||
| settings_delete_branch_on_merge: true | ||
| settings_discussions: false | ||
| settings_github_workflows_can_approve_pull_request_reviews: false | ||
| settings_merge_commit: false | ||
| settings_merge_rebase: false | ||
| settings_merge_squash: true | ||
| settings_projects: false | ||
| settings_protect_main_branch: false | ||
| settings_wiki: false | ||
| topics: github-settings,settings-as-code | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Inputs | ||
|
|
||
| The inputs of the action, as used in the | ||
| [Quickstart](../README.md#quickstart) workflow: | ||
|
|
||
| | Option | Description | | ||
| | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | debug | Enable debug logging | | ||
| | description | Change the description of a GitHub repository | | ||
| | project | The owner/repo | | ||
| | settings_actions_allowed_actions | Actions permissions: `all`, `local_only`, or `selected`. Use `selected` to allow OWNER + specific non-OWNER actions/reusable workflows | | ||
| | settings_actions_github_owned_allowed | When `settings_actions_allowed_actions` is `selected`, whether GitHub-owned actions (e.g. `actions/checkout`) are allowed | | ||
| | settings_actions_verified_allowed | When `settings_actions_allowed_actions` is `selected`, whether actions from verified creators are allowed | | ||
| | settings_actions_patterns_allowed | When `settings_actions_allowed_actions` is `selected`, comma-separated list of allowed actions/reusable workflows (e.g. `030/*`) | | ||
| | settings_actions_require_sha_pinning | Require actions to be pinned to a full-length commit SHA | | ||
| | settings_default_workflow_permissions | Set the default workflow permissions to read or write | | ||
| | settings_delete_branch_on_merge | Delete a branch on merge or not | | ||
| | settings_discussions | Enable the discussions tab or not | | ||
| | settings_github_workflows_can_approve_pull_request_reviews | Whether workflows can approve pull requests | | ||
| | settings_merge_commit | Enable merge commit | | ||
| | settings_merge_rebase | Enable merge request rebase | | ||
| | settings_merge_squash | Enable merge request squash | | ||
| | settings_protect_main_branch | Protect the main branch or not | | ||
| | settings_protect_main_branch_enforce_admins | Enforce branch protection for admins | | ||
| | settings_protect_main_branch_required_approving_review_count | The number of approvals that is required before a PR can be merged | | ||
| | settings_projects | Whether the project tab should be enabled | | ||
| | settings_wiki | Wiki enabled or not | | ||
| | topics | The topic(s) that will appear in the about menu of a project | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Testing | ||
|
|
||
| - [Install](https://github.com/cli/cli?tab=readme-ov-file#installation) gh cli. | ||
| - Create a read only token. | ||
| - Login: `gh auth login` and `choose token` option. | ||
| - Check [these graphql samples](https://gist.github.com/duboisf/68fb6e22ac0a2165ca298074f0e3b553) | ||
| that can be useful while testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # This file was autogenerated by uv via the following command: | ||
| # uv pip compile pyproject.toml --universal --python-version 3.11 --generate-hashes -o requirements.txt | ||
| click==8.5.0 \ | ||
| --hash=sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360 \ | ||
| --hash=sha256:ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34 | ||
| # via settings-action (pyproject.toml) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.