This commit is contained in:
Chase 2023-01-11 09:19:17 -06:00
parent 734d8248d1
commit 083f46e906
Signed by: chase
GPG Key ID: 9EC29E797878008C
6 changed files with 49 additions and 2 deletions

2
.github/SECRETS.md vendored
View File

@ -1,3 +1,5 @@
# Secrets
* `GH_PAT` - A GitHub [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with `repo` permissions.
* `DOCKER_USERNAME` - Your Docker Hub username.
* `DOCKER_PASSWORD` - Your Docker Hub password/access token.

29
.github/workflows/docker.yml vendored Normal file
View File

@ -0,0 +1,29 @@
---
name: "📦 Publish Docker Container"
on:
push:
branches: [master, main]
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip publish]')"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build the Docker Image
run: docker build . --file Dockerfile --tag "$DOCKER_USERNAME"/lidarr-true-singles:latest
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the Docker Image
run: docker push "$DOCKER_USERNAME"/lidarr-true-singles:latest

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM node:16-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
CMD [ "node", "." ]

View File

@ -11,6 +11,16 @@
Automatically unmonitor promotional singles from lidarr.
## Running
```bash
docker run --rm \
--name lidarr-true-singles \
-e LIDARR_URL=http://lidarr:8686 \
-e LIDARR_API_KEY=your_api_key \
chxseh/lidarr-true-singles
```
## Development
```bash
git clone https://github.com/chxseh/lidarr-true-singles.git
cd lidarr-true-singles

2
package-lock.json generated
View File

@ -10,7 +10,7 @@
"license": "MIT",
"dependencies": {
"dotenv": "16.0.3",
"node-fetch": "^3.3.0"
"node-fetch": "3.3.0"
},
"devDependencies": {
"eslint": "8.31.0",

View File

@ -27,7 +27,7 @@
"homepage": "https://github.com/chxseh/lidarr-true-singles#readme",
"dependencies": {
"dotenv": "16.0.3",
"node-fetch": "^3.3.0"
"node-fetch": "3.3.0"
},
"devDependencies": {
"eslint": "8.31.0",