Closes #3.
This commit is contained in:
parent
734d8248d1
commit
083f46e906
|
@ -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.
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1,6 @@
|
|||
FROM node:16-alpine
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production
|
||||
COPY . .
|
||||
CMD [ "node", "." ]
|
10
README.md
10
README.md
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue