Skip to content

Commit

Permalink
feat: [#1] Disable or enable wiki tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
030 committed Feb 28, 2024
1 parent 05c21ce commit 4b1db40
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# settings-action

Settings Action that will configure the settings of a GitHub repository.

## usage

| Option | Description |
| -------------------- | ----------------------------------------- |
| project | The owner/repo |
| settings_discussions | Enable the discussions tab or not |
| settings_projects | Whether the project tab should be enabled |
| settings_wiki | Wiki enabled or not |

```bash
---
name: settings-guard
'on':
schedule:
- cron: '42 6 * * *'
permissions: {}
jobs:
settings-action:
runs-on: ubuntu-22.04
steps:
- uses: 030/settings-action@v0.2.0
env:
GH_TOKEN: ${{ secrets.SETTINGS_GUARD }}
with:
project: 030/settings-guard
settings_discussions: false
settings_projects: false
```
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
description: |
Whether the projects tab should be disabled or enabled.
required: true
settings_wiki:
description: |
Whether the wiki tab should be disabled or enabled.
required: true
runs:
using: 'composite'
steps:
Expand All @@ -27,3 +31,6 @@ runs:
- name: disable the 'projects' tab for ${{ inputs.project }}
run: gh repo edit ${{ inputs.project }} --enable-projects=${{ inputs.settings_projects }}
shell: bash
- name: disable the 'wiki' tab for ${{ inputs.project }}
run: gh repo edit ${{ inputs.project }} --enable-wiki=${{ inputs.settings_wiki }}
shell: bash

0 comments on commit 4b1db40

Please sign in to comment.