Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tangilj/ghostie
Host content using GitHub Issues and Actions
https://github.com/tangilj/ghostie
actions content github images issues videos
Last synced: 17 days ago
JSON representation
Host content using GitHub Issues and Actions
- Host: GitHub
- URL: https://github.com/tangilj/ghostie
- Owner: TangilJ
- License: gpl-3.0
- Created: 2021-09-05T11:15:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-05T19:28:30.000Z (over 3 years ago)
- Last Synced: 2024-05-13T16:27:31.075Z (8 months ago)
- Topics: actions, content, github, images, issues, videos
- Language: JavaScript
- Homepage:
- Size: 101 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ghostie
(GitHub-host-ie)
Host content using GitHub Issues and Actions
[![GPLv3 License](https://img.shields.io/github/license/TheBlocks/ghostie)](https://github.com/TheBlocks/ghostie/blob/main/LICENSE/)
### [How it works](#How-it-works) • [Usage/Examples](#UsageExamples) • [Inputs](#Inputs) • [Built with](#Built-with)
## How it works
1. Create an issue
2. Attach your image/video
3. The Ghostie action is automatically triggered
4. Your content is now uploaded to your repository!See this demo repository to see Ghostie in action: [TheBlocks/ghostie-demo](https://github.com/TheBlocks/ghostie-demo)
https://user-images.githubusercontent.com/21197843/132138613-a90d5411-c0d7-48dd-b53e-56ddda572b64.mp4
## Usage/Examples
You need to create a yml file in `.github/workflows/` (e.g. `.github/workflows/ghostie.yml`) and then configure it to use Ghostie. Here are some example configurations you could use.
This following configuration sets every available input:
```yml
name: Ghostieon:
issues:
types: [opened, edited]jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Upload with Ghostie
uses: TheBlocks/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
branch-name: ${{ github.event.repository.default_branch }}
image-folder: "images/"
video-folder: "videos/"
misc-folder: "misc/"
commit-msg: "Create new image/video file"
allowed-users: "OWNER"
```If you're happy with the [defaults for the inputs](#Inputs), you could use a more minimal configuration:
```yml
name: Ghostieon:
issues:
types: [opened, edited]jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Upload with Ghostie
uses: TheBlocks/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
branch-name: ${{ github.event.repository.default_branch }}
```## Inputs
This action has multiple inputs so that you can customise it.
| Input name | Required? | Default value | Notes
| --------------- | --------- | ------------------------------- | -------------------------------
| `repo-token` | Yes | | Use `${{ secrets.GITHUB_TOKEN }}`
| `branch-name` | Yes | | The branch to upload the files to
| `image-folder` | No | `"images/"` | The folder where images get uploaded
| `video-folder` | No | `"videos/"` | The folder where videos get uploaded
| `misc-folder` | No | `"misc/"` | The folder where all other files get uploaded
| `commit-msg` | No | `"Create new image/video file"` | The commit message when files are committed
| `allowed-users` | No | `"OWNER"` | Allowed values are: `OWNER`, `COLLABORATOR`, `CONTRIBUTOR`, `FIRST_TIMER`, `FIRST_TIME_CONTRIBUTOR`, `MANNEQUIN`, `MEMBER`, `NONE`## Built with
- [GitHub Actions Toolkit](https://github.com/actions/toolkit)
- [sanitize-filename](https://github.com/parshap/node-sanitize-filename)