Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/actioncloud/github-raw-url
Action to convert a normal GitHub url to its corresponding raw url.
https://github.com/actioncloud/github-raw-url
github-actions github-raw-url github-utilities
Last synced: 2 months ago
JSON representation
Action to convert a normal GitHub url to its corresponding raw url.
- Host: GitHub
- URL: https://github.com/actioncloud/github-raw-url
- Owner: ActionCloud
- License: mit
- Created: 2019-11-21T09:05:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T13:26:48.000Z (over 1 year ago)
- Last Synced: 2024-11-07T08:04:06.399Z (2 months ago)
- Topics: github-actions, github-raw-url, github-utilities
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 10
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub raw url Action
![](https://github.com/actioncloud/github-raw-url/workflows/Test%20converting/badge.svg)
The [Action](https://github.com/marketplace/actions/github-raw-url) converts a normal GitHub file url to its raw url format.
For example, the raw url of `https://github.com/actioncloud/github-raw-url/blob/master/index.js` is:
```
https://raw.githubusercontent.com/actioncloud/github-raw-url/master/index.js
```This is the first GitHub Action I created, just take it as another [GitHub Actions: Hello World](https://github.com/actions/hello-world-javascript-action). But it's still useful though you can just write one-line script to do the same conversion job in your workflow configuration.
## Inputs
### `github-url`
**Required** A normal GitHub file url.
## Usage
```yaml
# in your workflow config file
jobs:
my-workflow-job:
steps:
- name: A previous step
id: previous-step
uses:
- name: Convert a url
id: convert-to-raw-url
# or actioncloud/github-raw-url@master
uses: actioncloud/github-raw-url@v1
with:
github-url: ${{ previous-step.outputs.github-url }}
- name: Another step
uses:
with:
github-raw-url: ${{ convert-to-raw-url.outputs.raw-url }}
```