Loading page…
Pitch
Description
Comments
Submit links to HackerNews in a Docker container image
This small Shell script will submit links to HackerNews. It is hugely beneficial to automate the task of submission at desired schedules.
To run the script, run the following command:
docker run \
--name submit-hackernews \
--rm \
-e "HACKERNEWS_USERNAME=your_username" \
-e "HACKERNEWS_PASSWORD=your_password" \
ghcr.io/meysam81/submit-hackernews:v1 \
-t "This is the title of submission" \
-u "https://example.com"
You can run this in a GitHub Actions workflow. Here is an example:
name: ci
on:
workflow_dispatch:
inputs:
title:
description: The title of the link to submit.
required: true
url:
description: The URL of the link to submit.
required: true
verbose:
type: boolean
description: Verbose?
default: true
jobs:
submit-hackernews:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Submit link to Hacker News
uses: meysam81/submit-hackernews@v1
with:
username: ${{ secrets.HACKERNEWS_USERNAME }}
password: ${{ secrets.HACKERNEWS_PASSWORD }}
title: ${{ github.event.inputs.title }}
url: ${{ github.event.inputs.url }}
verbose: ${{ github.event.inputs.verbose }}
No comments yet.
Sign in to be the first to comment.