https://github.com/actionsdesk/ghec-report-reinvite-action
GitHub Action to reinvite users to GitHub Enterprise Cloud, depends on https://github.com/ActionsDesk/ghec-invitations-report-action
https://github.com/actionsdesk/ghec-report-reinvite-action
github-enterprise-cloud reinvite-users
Last synced: 2 months ago
JSON representation
GitHub Action to reinvite users to GitHub Enterprise Cloud, depends on https://github.com/ActionsDesk/ghec-invitations-report-action
- Host: GitHub
- URL: https://github.com/actionsdesk/ghec-report-reinvite-action
- Owner: ActionsDesk
- License: mit
- Created: 2020-11-13T10:10:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T08:48:45.000Z (3 months ago)
- Last Synced: 2025-04-22T10:20:46.478Z (2 months ago)
- Topics: github-enterprise-cloud, reinvite-users
- Language: JavaScript
- Homepage:
- Size: 1.83 MB
- Stars: 3
- Watchers: 0
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Contributing: .github/contributing.md
- License: license
- Code of conduct: .github/code_of_conduct.md
- Codeowners: .github/codeowners
- Security: .github/security.md
Awesome Lists containing this project
README
# ghec-report-reinvite-action
> GitHub Action to reinvite users to GitHub Enterprise Cloud organizations after https://github.com/ActionsDesk/ghec-invitations-report-action created a report.
[](https://github.com/ActionsDesk/ghec-report-reinvite-action/actions/workflows/test.yml) [](https://github.com/ActionsDesk/ghec-report-reinvite-action/actions/workflows/codeql.yml) [](https://github.com/prettier/prettier)
## Usage
**Scheduled report example**
```yml
on:
schedule:
# Runs at 00:00 UTC on the first of every month
- cron: '0 0 1 * *'name: Invitations
jobs:
# use https://github.com/ActionsDesk/ghec-invitations-report-action first to create the report
report:
runs-on: ubuntu-latestoutputs:
base_sha: ${{ steps.create-report.outputs.base_sha }}
head_sha: ${{ steps.create-report.outputs.head_sha }}steps:
- name: Checkout
uses: actions/checkout@v2- name: Create invitations report
uses: ActionsDesk/[email protected]
id: create-report
with:
token: ${{ secrets.ADMIN_TOKEN }}
enterprise: 'my-enterprise'
report_path: 'reports/invitations.csv'# reinvite users from the report created in report job above
reinvite:
runs-on: ubuntu-latest
needs: report
if: ${{ needs.report.outputs }} && ${{ needs.report.outputs.base_sha }} && ${{ needs.report.outputs.head_sha }}steps:
- name: Checkout
uses: actions/checkout@v2- name: Reinvite users from report
uses: ActionsDesk/[email protected]
with:
token: ${{ secrets.ADMIN_TOKEN }}
report_path: 'reports/invitations.csv'
base_sha: ${{ needs.report.outputs.base_sha }}
head_sha: ${{ needs.report.outputs.head_sha }}
```On-demand report example
```yml
on:
workflow_dispatch:
inputs:
enterprise:
description: 'GitHub Enterprise Cloud account, if omitted the report will target the repository organization only'
required: false
default: 'my-enterprise'
report_path:
description: 'Path to the report file'
default: 'reports/invitations.csv'
required: falsename: On-demand invitations
jobs:
# use https://github.com/ActionsDesk/ghec-invitations-report-action first to create the report
report:
runs-on: ubuntu-latestoutputs:
base_sha: ${{ steps.create-report.outputs.base_sha }}
head_sha: ${{ steps.create-report.outputs.head_sha }}steps:
- name: Checkout
uses: actions/checkout@v2- name: Create invitations report
uses: ActionsDesk/[email protected]
id: create-report
with:
token: ${{ secrets.ADMIN_TOKEN }}
enterprise: ${{ github.event.inputs.enterprise }}
report_path: ${{ github.event.inputs.report_path }}# reinvite users from the report created in report job above
reinvite:
runs-on: ubuntu-latest
needs: report
if: ${{ needs.report.outputs }} && ${{ needs.report.outputs.base_sha }} && ${{ needs.report.outputs.head_sha }}steps:
- name: Checkout
uses: actions/checkout@v2- name: Reinvite users from report
uses: ActionsDesk/[email protected]
with:
token: ${{ secrets.ADMIN_TOKEN }}
report_path: ${{ github.event.inputs.report_path }}
base_sha: ${{ needs.report.outputs.base_sha }}
head_sha: ${{ needs.report.outputs.head_sha }}
```### Action Inputs
| Name | Description | Default | Required |
| :------------ | :---------------------------------------------------------------------------------- | :---------------------- | :------- |
| `token` | A `admin:org`, `read:user`, `user:email` scoped [PAT] | | `true` |
| `report_path` | Report CSV file path within the repository | `invitation-report.csv` | `true` |
| `base_sha` | Report base SHA, from https://github.com/ActionsDesk/ghec-invitations-report-action | | `true` |
| `head_sha` | Report head SHA, from https://github.com/ActionsDesk/ghec-invitations-report-action | | `true` |## License
- [MIT License](./license)
[pat]: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token 'Personal Access Token'