Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/meysam81/submit-hackernews

Submit links to HackerNews in a Docker container image
https://github.com/meysam81/submit-hackernews

container docker hacker-news hackernews hackernews-api hackernews-client hackernewsapi job scheduled-jobs scheduled-submission scheduled-tasks ycombinator ycombinator-hacker-news

Last synced: 2 months ago
JSON representation

Submit links to HackerNews in a Docker container image

Awesome Lists containing this project

README

        

# Submit HackerNews

[![GitHub repo size](https://img.shields.io/github/repo-size/meysam81/submit-hackernews)](https://github.com/meysam81/submit-hackernews)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/meysam81/submit-hackernews)](https://github.com/meysam81/submit-hackernews/commits/main/)
[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/meysam81/submit-hackernews)](https://github.com/meysam81/submit-hackernews)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/meysam81/submit-hackernews/main.svg)](https://results.pre-commit.ci/latest/github/meysam81/submit-hackernews/main)
[![Docker Image Version](https://ghcr-badge.egpl.dev/meysam81/submit-hackernews/latest_tag?color=%2344cc11&ignore=latest&label=Docker+Image+Version&trim=)](https://github.com/users/meysam81/packages/container/package/submit-hackernews)
[![Docker Image Size](https://ghcr-badge.egpl.dev/meysam81/submit-hackernews/size?color=%2344cc11&tag=latest&label=Docker+Image+Size&trim=)](https://github.com/users/meysam81/packages/container/package/submit-hackernews)

- [Submit HackerNews](#submit-hackernews)
- [Introduction](#introduction)
- [Usage: GitHub Actions](#usage-github-actions)
- [Star History](#star-history)

## Introduction

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:

```bash
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"
```

## Usage: GitHub Actions

You can run this in a GitHub Actions workflow. Here is an example:

```yaml
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 }}
```

## Star History





Star History Chart