generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from lelia/wayfair_incubator_org_transfer
Repository org transfer: wayfair-incubator
- Loading branch information
Showing
9 changed files
with
8,377 additions
and
3,035 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 |
---|---|---|
@@ -1,66 +1,52 @@ | ||
name: Tests | ||
|
||
on: # rebuild any PRs and main branch changes | ||
on: # Rebuild any PRs and main branch changes | ||
|
||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
owner: | ||
description: 'Owner of Github repository being forked' | ||
required: true | ||
repo: | ||
description: 'Github repository being forked' | ||
required: true | ||
org: | ||
description: 'Github organization to fork the repository into' | ||
required: false | ||
user: | ||
description: 'Github user requesting the fork' | ||
required: false | ||
addUser: | ||
description: 'Add Github user to organization if missing' | ||
required: false | ||
default: false | ||
licenseAllowlist: | ||
description: 'List of allowed licenses for repository being forked' | ||
required: false | ||
default: 'undefined' | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
INPUT_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: "🛠 test npm build" | ||
- run: | | ||
npm install | ||
- run: | | ||
npm run all | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./ | ||
name: "🚀 test github user workflow" | ||
with: | ||
path: ./ | ||
token: ${{ secrets.GH_API_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
repo: tremor-runtime | ||
owner: tremor-rs | ||
user: lelia | ||
- uses: ./ | ||
name: "🌎 test github org workflow" | ||
with: | ||
path: ./ | ||
token: ${{ secrets.GH_API_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
licenseAllowlist: "0bsd\napache-2.0\nmit" | ||
repo: roadie-backstage-plugins | ||
owner: RoadieHQ | ||
org: wayfair-contribs | ||
user: lelia | ||
addUser: true | ||
############################################################################## | ||
# Integration tests temporarily disabled while token access issue is diagnosed | ||
############################################################################## | ||
|
||
# test: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: ./ | ||
# name: "🚀 test github user workflow" | ||
# with: | ||
# path: ./ | ||
# token: ${{ secrets.ACCESS_TOKEN }} | ||
# ref: ${{ github.event.pull_request.head.sha }} | ||
# repo: tremor-runtime | ||
# owner: tremor-rs | ||
# user: lelia | ||
# - uses: ./ | ||
# name: "🌎 test github org workflow" | ||
# with: | ||
# path: ./ | ||
# token: ${{ secrets.ACCESS_TOKEN }} | ||
# ref: ${{ github.event.pull_request.head.sha }} | ||
# licenseAllowlist: "0bsd\napache-2.0\nmit" | ||
# repo: roadie-backstage-plugins | ||
# owner: RoadieHQ | ||
# org: wayfair-contribs | ||
# user: lelia | ||
# addUser: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# ⑂ forker | ||
|
||
[![Version](https://img.shields.io/badge/Version-0.0.1-7F187F.svg)](https://github.com/lelia/forker/releases) | ||
[![Version](https://img.shields.io/badge/Version-0.0.2-7F187F.svg)](https://github.com/wayfair-incubator/forker/releases) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-7462E0.svg)](LICENSE) | ||
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-24B8EE.svg)](CODE_OF_CONDUCT.md) | ||
[![Tests](https://github.com/lelia/forker/actions/workflows/test.yml/badge.svg)](https://github.com/lelia/forker/actions/workflows/test.yml) | ||
[![Tests](https://github.com/wayfair-incubator/forker/actions/workflows/test.yml/badge.svg)](https://github.com/wayfair-incubator/forker/actions/workflows/test.yml) | ||
|
||
GitHub action to automate fork creation. This action uses [octokit.js](https://github.com/octokit/octokit.js) and the [GitHub API](https://docs.github.com/en/rest) to automatically create a repository fork, either in your personal namespace or an organization you administer. | ||
|
||
|
@@ -19,7 +19,7 @@ The GitHub API [token](https://docs.github.com/en/github/authenticating-to-githu | |
|
||
> 💡 **Note:** Ensure the token you are using has sufficient permissions to fork repositories into your intended destination (either an organization or individual user account). In particular, the builtin `GITHUB_TOKEN` has [read-only permissions](https://docs.github.com/en/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token) for repository forks, and therefore may not provide sufficient privileges for use with `forker`. | ||
**Example:** `${{ secrets.GH_API_TOKEN }}` | ||
**Example:** `${{ secrets.ACCESS_TOKEN }}` | ||
|
||
### `owner` (string, required) | ||
|
||
|
@@ -69,25 +69,25 @@ A newline-delimited (`"\n"`) string representing a list of allowed [license keys | |
|
||
### Typical | ||
|
||
In most cases, you'll want to use the latest stable version (eg. `v0.0.1`): | ||
In most cases, you'll want to use the latest stable version (eg. `v0.0.2`): | ||
|
||
```yaml | ||
uses: lelia/[email protected].1 | ||
uses: wayfair-incubator/[email protected].2 | ||
with: | ||
token: ${{ secrets.GH_API_TOKEN }} | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
repo: tremor-runtime | ||
owner: tremor-rs | ||
user: lelia | ||
``` | ||
### Development | ||
If you're actively [developing](#Developing) a new feature for the action, you can always reference a specific commit SHA (eg. `16a9cab520b7f00e68397a7b8a4067ac40353230`): | ||
If you're actively [developing](#Developing) a new feature for the action, you can always reference a specific commit SHA (eg. `98e4e7dcc6c9a8cb29c1f8de7d6d2c03dcabc4b9`): | ||
|
||
```yaml | ||
uses: lelia/forker@899add26c0bb00f6c8366cd8c5555e9309580193 | ||
uses: wayfair-incubator/forker@98e4e7dcc6c9a8cb29c1f8de7d6d2c03dcabc4b9 | ||
with: | ||
token: ${{ secrets.GH_API_TOKEN }} | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
repo: tremor-runtime | ||
owner: tremor-rs | ||
user: lelia | ||
|
@@ -98,9 +98,9 @@ with: | |
If you are automating forking on behalf of a GitHub organization, you may wish to leverage the optional `addUser` and `licenseAllowlist` params: | ||
|
||
```yaml | ||
uses: lelia/[email protected].1 | ||
uses: wayfair-incubator/[email protected].2 | ||
with: | ||
token: ${{ secrets.GH_API_TOKEN }} | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
repo: tremor-runtime | ||
owner: tremor-rs | ||
org: wayfair-contribs | ||
|
@@ -146,7 +146,7 @@ Then run [ncc](https://github.com/zeit/ncc) and push the results: | |
npm run package | ||
git add dist | ||
git commit -a -m "prod dependencies" | ||
git push origin releases/v0.0.1 | ||
git push origin releases/v0.0.2 | ||
``` | ||
|
||
> 💡 **Note:** We recommend using the `--license` option for `ncc`, which will create a license file for all of the production node modules used in your project. | ||
|
@@ -163,11 +163,11 @@ You can now validate the action by referencing `./` in a workflow in your repo ( | |
uses: ./ | ||
with: | ||
path: ./ | ||
token: ${{ secrets.GH_API_TOKEN }} | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
repo: tremor-runtime | ||
owner: tremor-rs | ||
user: lelia | ||
``` | ||
|
||
See the [Actions tab](https://github.com/lelia/forker/actions) to view runs of this action! ✅ | ||
See the [Actions tab](https://github.com/wayfair-incubator/forker/actions) to view runs of this action! ✅ |
Oops, something went wrong.