Merge 2e77c4f1f34efeb7b2d473b7b0bfa5fd8b018450 into 9d5b8d99f7237df8668f553611d2e5e53359da4f

This commit is contained in:
1900 2023-12-31 09:37:04 +00:00 committed by GitHub
commit 7ace9947d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 194 additions and 38 deletions

View File

@ -1,38 +1,47 @@
name: Publish Docker Image name: Build Yarr Docker image
on: on:
workflow_dispatch:
push: push:
tags: [ 'v*.*.*', 'v*.*', 'v*', 'latest' ] paths:
env: - 'yarr-version.txt'
REGISTRY: ghcr.io
IMAGE_NAME: nkanaev/yarr
jobs: jobs:
build-and-push-image: main:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps: steps:
- name: Checkout repository -
uses: actions/checkout@v3 name: Read latest release tag
id: read-tag
- name: Log in to the Container registry run: |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 echo ::set-output name=tag::$(curl -sL https://raw.githubusercontent.com/rebron1900/yarr/main/yarr-version.txt)
-
name: Checkout
uses: actions/checkout@v2
with: with:
registry: ${{ env.REGISTRY }} repository: 'rebron1900/yarr'
username: ${{ github.actor }} ref: ${{ steps.read-tag.outputs.tag }}
password: ${{ secrets.GITHUB_TOKEN }} -
name: Remove GOARCH
- name: Extract Docker metadata run: |
id: meta sed -i -e 's/GOARCH=amd64//g' makefile
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 -
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to registry
uses: docker/login-action@v1
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image -
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a name: Push to Docker
uses: docker/build-push-action@v2
with: with:
context: . context: .
file: ./etc/dockerfile platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: |
labels: ${{ steps.meta.outputs.labels }} ${{ secrets.DOCKER_USERNAME }}/yarr:latest
${{ secrets.DOCKER_USERNAME }}/yarr:${{ steps.read-tag.outputs.tag }}

View File

@ -100,8 +100,6 @@ jobs:
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: ${{ github.ref }} release_name: ${{ github.ref }}
draft: true
prerelease: true
- name: Download Artifacts - name: Download Artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
@ -142,3 +140,38 @@ jobs:
asset_path: ./yarr-linux.zip asset_path: ./yarr-linux.zip
asset_name: yarr-${{ github.ref }}-linux64.zip asset_name: yarr-${{ github.ref }}-linux64.zip
asset_content_type: application/zip asset_content_type: application/zip
build_docker:
runs-on: ubuntu-latest
needs: [create_release]
steps:
- name: Read latest release tag
id: read-tag
run: |
echo ::set-output name=tag::$(curl -sL https://raw.githubusercontent.com/rebron1900/yarr/master/yarr-version.txt)
- name: Checkout
uses: actions/checkout@v2
with:
repository: 'rebron1900/yarr'
ref: ${{ steps.read-tag.outputs.tag }}
- name: Remove GOARCH
run: |
sed -i -e 's/GOARCH=amd64//g' makefile
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/yarr:latest
${{ secrets.DOCKER_USERNAME }}/yarr:${{ steps.read-tag.outputs.tag }}

View File

@ -1,4 +1,4 @@
VERSION=2.4 VERSION=2.5
GITHASH=$(shell git rev-parse --short=8 HEAD) GITHASH=$(shell git rev-parse --short=8 HEAD)
CGO_ENABLED=1 CGO_ENABLED=1

View File

@ -12,6 +12,29 @@ The app is a single binary with an embedded database (SQLite).
The latest prebuilt binaries for Linux/MacOS/Windows AMD64 are available The latest prebuilt binaries for Linux/MacOS/Windows AMD64 are available
[here](https://github.com/nkanaev/yarr/releases/latest). Installation instructions: [here](https://github.com/nkanaev/yarr/releases/latest). Installation instructions:
* Command Arges
```
-addr string
address to run server on (default "127.0.0.1:7070")
-auth-file path
path to a file containing username:password
-base string
base path of the service url
-cert-file path
path to cert file for https
-db path
storage file path
-key-file path
path to key file for https
-log-file path
path to log file to use instead of stdout
-open
open the server in browser
-version
print application version
```
* MacOS * MacOS
Download `yarr-*-macos64.zip`, unzip it, place `yarr.app` in `/Applications` folder, [open the app][macos-open], click the anchor menu bar icon, select "Open". Download `yarr-*-macos64.zip`, unzip it, place `yarr.app` in `/Applications` folder, [open the app][macos-open], click the anchor menu bar icon, select "Open".
@ -27,12 +50,53 @@ and run [the script](etc/install-linux.sh).
[macos-open]: https://support.apple.com/en-gb/guide/mac-help/mh40616/mac [macos-open]: https://support.apple.com/en-gb/guide/mac-help/mh40616/mac
For self-hosting, see `yarr -h` for auth, tls & server configuration flags. * Docker environment
See more: You can use docker or docker-compose to run yarr, and you can also use environment variables to configure startup parameters.
* [Building from source code](doc/build.md) - `YARR_ADDR` address to run server on (default "127.0.0.1:7070")
* [Fever API support](doc/fever.md) - `YARR_BASE` base path of the service url
- `YARR_AUTHFILE` path to a file containing username:password
- `YARR_CERTFILE` path to cert file for https
- `YARR_KEYFILE` path to key file for https
- `YARR_DB` storage file path
- `YARR_LOGFILE` path to log file to use instead of stdout
* Docker run
```
docker run -d \
--name yarr \
-p 25255:7070 \
-e YARR_AUTHFILE="/data/.auth.list" \
-v /data/yarr-data:/data \
--restart always \
arsfeld/yarr:latest
```
* Docker-Compose Run
Create a file named `.auth.list` under the `/data/` directory, and the content format should be: `username:password`.
Then start by running docker-compose up -d and enjoy!
```yaml
version: '3.3'
services:
yarr:
container_name: yarr
image: 'arsfeld/yarr:latest'
restart: always
ports:
- '25255:7070'
environment:
YARR_AUTHFILE: "/data/.auth.list"
volumes:
- '/data/yarr-data:/data'
```
* See more:
* [Building from source code](doc/build.md)
* [Fever API support](doc/fever.md)
## credits ## credits

View File

@ -358,7 +358,7 @@
<p class="cursor-default"><b>New Feed</b></p> <p class="cursor-default"><b>New Feed</b></p>
<form action="" @submit.prevent="createFeed(event)" class="mt-4"> <form action="" @submit.prevent="createFeed(event)" class="mt-4">
<label for="feed-url">URL</label> <label for="feed-url">URL</label>
<input id="feed-url" name="url" type="url" class="form-control" required autocomplete="off" :readonly="feedNewChoice.length > 0" placeholder="https://example.com/feed" v-focus> <input id="feed-url" name="url" type="url" class="form-control" required autocomplete="off" :readonly="feedNewChoice.length > 0" placeholder="https://example.com/feed" v-focus V-model="autoFeedUrl">
<label for="feed-folder" class="mt-3 d-block"> <label for="feed-folder" class="mt-3 d-block">
Folder Folder
<a href="#" class="float-right text-decoration-none" @click.prevent="createNewFeedFolder()">new folder</a> <a href="#" class="float-right text-decoration-none" @click.prevent="createNewFeedFolder()">new folder</a>

View File

@ -183,6 +183,14 @@ Vue.component('relative-time', {
}) })
var vm = new Vue({ var vm = new Vue({
mounted:function(){
const subscribe_to = new URLSearchParams(window.location.search).get('subscribe_to');
if(subscribe_to){
vm.settings = 'create'
//document.getElementById("feed-url").value = subscribe_to;
this.autoFeedUrl = subscribe_to;
}
},
created: function() { created: function() {
this.refreshStats() this.refreshStats()
.then(this.refreshFeeds.bind(this)) .then(this.refreshFeeds.bind(this))
@ -676,6 +684,7 @@ var vm = new Vue({
this.filteredTotalStats = statsTotal this.filteredTotalStats = statsTotal
}, },
} }
}) })
vm.$mount('#app') vm.$mount('#app')

View File

@ -525,6 +525,46 @@ a,
margin: 0 !important; margin: 0 !important;
} }
/* Beautify the scroll bar. */
:root {
--custom-thumb-color: #6c757d;
--custom-track-color: rgba(0, 0, 0, 0);
--custom-width: thin;
--custom-thumb-color-hover: #ef4c4c;
--custom-track-color-hover: rgba(0, 0, 0, 0);
--webkit-scrollbar-width-height: 7px;
--webkit-scrollbar-border-radius: 6px;
--workaround-gh-scrollbars: 0;
}
*:not(select) {
scrollbar-color: var(--custom-thumb-color) var(--custom-track-color) !important;
scrollbar-width: var(--custom-width) !important;
}
/* Chrome and derivatives*/
::-webkit-scrollbar {
max-width: var(--webkit-scrollbar-width-height) !important;
max-height: var(--webkit-scrollbar-width-height) !important;
background: var(--custom-track-color) !important;
}
::-webkit-scrollbar-corner,
::-webkit-scrollbar-track,
::-webkit-scrollbar-track-piece {
background: var(--custom-track-color) !important;
}
::-webkit-scrollbar-thumb {
background: var(--custom-thumb-color) !important;
border-radius: var(--webkit-scrollbar-border-radius) !important;
}
::-webkit-scrollbar-corner:hover,
::-webkit-scrollbar-track:hover,
::-webkit-scrollbar-track-piece:hover {
background: var(--custom-track-color-hover) !important;
}
::-webkit-scrollbar-thumb:hover {
background: var(--custom-thumb-color-hover) !important;
}
/* responsive layout /* responsive layout
tablet: tablet:

1
yarr-version.txt Normal file
View File

@ -0,0 +1 @@
v2.5