Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 6 hours 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 (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-19T02:41:22.000Z (about 1 year ago)
- Last Synced: 2024-04-26T06:44:21.843Z (7 months ago)
- Topics: github-enterprise-cloud, reinvite-users
- Language: JavaScript
- Homepage:
- Size: 1.15 MB
- Stars: 2
- Watchers: 1
- Forks: 8
- Open Issues: 9
-
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.
[![test](https://github.com/ActionsDesk/ghec-report-reinvite-action/actions/workflows/test.yml/badge.svg)](https://github.com/ActionsDesk/ghec-report-reinvite-action/actions/workflows/test.yml) [![codeql](https://github.com/ActionsDesk/ghec-report-reinvite-action/actions/workflows/codeql.yml/badge.svg)](https://github.com/ActionsDesk/ghec-report-reinvite-action/actions/workflows/codeql.yml) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](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'