generated from austenstone/action-typescript
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6448cd1
commit ef29374
Showing
3 changed files
with
107 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -7,6 +7,8 @@ In addition to this it can also deploy users from a CSV file. This is useful as | |
## Usage | ||
Create a workflow (eg: `.github/workflows/copilot-license-cleanup.yml`). See [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file). | ||
|
||
### Deploying users from a CSV file | ||
|
||
If you want to deploy users from a CSV file you will need to create a CSV file with the following columns: | ||
- `organization` - The organization to add the user to | ||
- `deployment_group` - An arbitrary group name used to track the deployments | ||
|
@@ -21,6 +23,8 @@ exampleorg1,group1,octocat,2024-01-15 | |
exampleorg1,group1,octodog,2024-01-15 | ||
``` | ||
|
||
This requires the users to already exist as members of the enterprise and target organization. | ||
|
||
### PAT(Personal Access Token) | ||
|
||
You will need to [create a PAT(Personal Access Token)](https://github.com/settings/tokens/new?scopes=manage_billing:copilot) that has `manage_billing:copilot` access. If you are specifying an 'enterprise' rather than individual organizations you must also include the `read:org` and `read:enterprise` scopes. | ||
|
@@ -103,11 +107,16 @@ jobs: | |
#### Example deploying users from a CSV file | ||
```yml | ||
# Checkout your repo so we can access the CSV file | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- uses: austenstone/[email protected] | ||
with: | ||
github-token: ${{ secrets.TOKEN }} | ||
deploy-users: true | ||
# Optional inputs | ||
deploy-users-dry-run: false # Default is true | ||
deploy-users-csv: ./copilot-users.csv | ||
deploy-validation-time: 3 | ||
``` | ||
|
@@ -134,6 +143,7 @@ Various inputs are defined in [`action.yml`](action.yml): | |
| job-summary | Whether to output a summary of the job | true | | ||
| csv | Whether to output a CSV of inactive users | false | | ||
| deploy-users | Whether to deploy users from a CSV file | false | | ||
| deploy-users-dry-run | Whether to perform a dry run when deploying users | true | | ||
| deploy-users-csv | CSV file location if deploying users | ./copilot-users.csv | | ||
| deploy-validation-time | The number of days to attempt to deploy the user beyond activation date | 3 | | ||
|
||
|
This file contains 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 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