Skip to content

chore: update README and devcontainer.json for permissions and VSCode formatting #5

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 2 commits into from
Oct 10, 2024
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: 8 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"github.vscode-pull-request-github",
"me-dutour-mathieu.vscode-github-actions",
"yzhang.markdown-all-in-one",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"biomejs.biome"
],
"settings": {
"editor.tabSize": 2,
Expand All @@ -31,6 +32,12 @@
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
}
Expand Down
36 changes: 32 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ details, and a full changelog.
- **Flexible Configuration**: Offers advanced input options for customization, allowing you to tailor the action to your
specific needs.

## Demo

Check out our [Terraform Modules Demo](https://github.com/techpivot/terraform-modules-demo) repository for a practical
example of how to use this action in a monorepo setup. See real-world usage in action:

- [**Pull Request - Initial**](https://github.com/techpivot/terraform-modules-demo/pull/1)
- [**Pull Request - Module Changes**](https://github.com/techpivot/terraform-modules-demo/pull/2)
- [**Wiki**](https://github.com/techpivot/terraform-modules-demo/wiki)
- [**Releases**](https://github.com/techpivot/terraform-modules-demo/releases)
- [**_More Pull Request Examples_**](https://github.com/techpivot/terraform-modules-demo/pulls?q=is%3Apr+is%3Aclosed)

## Screenshots

<p float="left" align="center">
Expand Down Expand Up @@ -66,10 +77,10 @@ details, and a full changelog.
Before using this action, make sure that the wiki is enabled and initialized for your repository:

1. Go to your repository's homepage.
1. Navigate to the "Settings" tab.
1. Under the "Features" section, ensure the "Wikis" option is checked to enable the GitHub Wiki.
1. Navigate to the "Wiki" tab on your repository.
1. Click the "Create the first page" button and add a basic title like "Home" to initialize the wiki with an initial
1. Navigate to the **Settings** tab.
1. Under the **Features** section, ensure the **Wikis** option is checked to enable the GitHub Wiki.
1. Navigate to the **Wiki** tab on your repository.
1. Click the **Create the first page** button and add a basic title like **Home** to initialize the wiki with an initial
commit.
1. Save the changes to ensure your wiki is not empty when the GitHub Action updates it with module information.

Expand Down Expand Up @@ -102,6 +113,23 @@ jobs:
uses: techpivot/terraform-module-releaser@v1
```

## Permissions

Before executing the GitHub Actions workflow, ensure that you have the necessary permissions set for accessing pull
requests and creating releases.

- By default, this GitHub Action uses the
[`GITHUB_TOKEN`](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication)
associated with the workflow. To properly comment on pull requests and create tags/releases, the workflow permission
for `pull-requests` must be set to `"write"`.
- Additionally, the workflow permission for `contents` must also be set to `"write"` to allow the action to create tags
and releases.
- If you are using a Personal Access Token (PAT), ensure that it has the `repo` scope granted. This permission is
required for the action to read and write to the repository, including managing pull requests and creating releases.

If the permissions are insufficient, the action may fail with a 403 error, indicating a lack of access to the necessary
resources.

## Optional Inputs

| Input | Description | Default |
Expand Down