Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kesin11/gh-workflow-ls
Show GitHub Actions workflow yaml expanding Reusable Workflow job and Composite Actions step
https://github.com/kesin11/gh-workflow-ls
gh-extension
Last synced: 3 months ago
JSON representation
Show GitHub Actions workflow yaml expanding Reusable Workflow job and Composite Actions step
- Host: GitHub
- URL: https://github.com/kesin11/gh-workflow-ls
- Owner: Kesin11
- License: mit
- Created: 2024-02-05T01:11:07.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-10-18T04:15:03.000Z (4 months ago)
- Last Synced: 2024-10-19T06:09:07.309Z (4 months ago)
- Topics: gh-extension
- Language: TypeScript
- Homepage:
- Size: 79.1 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gh-workflow-ls
Show GitHub Actions workflow yaml expanding
[Reusable Workflow](https://docs.github.com/en/actions/using-workflows/reusing-workflows)
job and
[Composite Actions](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action)
step.## Installation
`gh-workflow-ls` can be installed as a
[GitHub CLI extension](https://cli.github.com/manual/gh_extension).```bash
gh extension install Kesin11/gh-workflow-ls
```## Usage
```bash
gh workflow-ls \
-t $(gh auth token) \
https://github.com/OWNER/REPO/actions/runs/RUN_ID
````-t (--token)` can ommit by using `GITHUB_TOKEN` environment variable.
## Sample output
```yaml
$ gh workflow-ls.ts https://github.com/Kesin11/actions-newfeature-playground/actions/runs/7772753912workflow: Reusable caller
reusable: call_reusable (https://github.com/Kesin11/actions-newfeature-playground/blob/f05f80f4c370179b42dd9e8d6824ddbcf9f9a5cc/.github/workflows/reusable_callable.yml)
job: echo_foo
- step: actions/checkout@v4
- step: echo "inputs.foo is ${{ inputs.foo }}"
job: notify
- step: actions/checkout@v4
- composite: ./.github/actions/notify (https://github.com/Kesin11/actions-newfeature-playground/blob/f05f80f4c370179b42dd9e8d6824ddbcf9f9a5cc/.github/actions/notify/action.yml)
- step: Notify
job: notify
- step: actions/checkout@v4
- composite: ./.github/actions/notify (https://github.com/Kesin11/actions-newfeature-playground/blob/f05f80f4c370179b42dd9e8d6824ddbcf9f9a5cc/.github/actions/notify/action.yml)
- step: Notify
```## GHES support
You can use `gh-workflow-ls` with GitHub Enterprise Server(GHES)`. Although, you
should have using a token for GHES.```bash
gh workflow-ls \
-t $(gh auth token -h YOUR_ENTERPRISE_HOST) \
https://YOUR_ENTERPRISE_HOST/OWNER/REPO/actions/runs/RUN_ID
```## Run using Deno
`gh-workflow-ls` is written by Deno, so you can run using your Deno.
```bash
deno run --allow-env --allow-net workflow-ls.ts \
-t $(gh auth token) \
https://github.com/OWNER/REPO/actions/runs/RUN_ID
```Also you can run it from URL directly.
```bash
deno run --allow-env --allow-net \
https://raw.githubusercontent.com/Kesin11/gh-workflow-ls/main/workflow-ls.ts \
-t $(gh auth token) \
https://github.com/OWNER/REPO/actions/runs/RUN_ID
```# LICENSE
MIT