Skip to content

Commit 338eb84

Browse files
committed
chore(docs): provide a GitHub Actions usage example
1 parent 0013c87 commit 338eb84

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,42 @@ docker run \
2121
-u "https://example.com"
2222
```
2323

24+
## Usage: GitHub Actions
25+
26+
You can run this in a GitHub Actions workflow. Here is an example:
27+
28+
```yaml
29+
name: ci
30+
31+
on:
32+
workflow_dispatch:
33+
inputs:
34+
title:
35+
description: The title of the link to submit.
36+
required: true
37+
url:
38+
description: The URL of the link to submit.
39+
required: true
40+
verbose:
41+
type: boolean
42+
description: Verbose?
43+
default: true
44+
45+
jobs:
46+
submit-hackernews:
47+
if: github.event_name == 'workflow_dispatch'
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Submit link to Hacker News
51+
uses: meysam81/submit-hackernews@v1
52+
with:
53+
username: ${{ secrets.HACKERNEWS_USERNAME }}
54+
password: ${{ secrets.HACKERNEWS_PASSWORD }}
55+
title: ${{ github.event.inputs.title }}
56+
url: ${{ github.event.inputs.url }}
57+
verbose: ${{ github.event.inputs.verbose }}
58+
```
59+
2460
## Star History
2561
2662
<a href="https://star-history.com/#meysam81/submit-hackernews&Timeline">

0 commit comments

Comments
 (0)