Skip to content

Commit

Permalink
Merge branch 'FreshRSS:edge' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeik0s authored Jan 9, 2024
2 parents fe5cb4f + c89073d commit 43a13df
Show file tree
Hide file tree
Showing 512 changed files with 7,879 additions and 9,961 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ or as [GitHub Codespaces](https://github.com/features/codespaces) simply in a We
A test instance of FreshRSS is automatically started as visible from the *Ports* tab: check the *Local Address* column, and click on the *Open in browser* 🌐 icon.
It runs the FreshRSS code that you are currently editing.

Apache logs can be seen in `/var/log/apache2/access.log` and `/var/log/apache2/error.log`.

## Software tests

Running the tests can be done directly from the built-in terminal, e.g.:
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ cp ./Docker/*.Apache.conf /etc/apache2/conf.d/
chown -R developer:www-data /home/developer/freshrss-data
chmod -R g+rwX /home/developer/freshrss-data

httpd
httpd -c 'ErrorLog "/var/log/apache2/error.log"' -c 'CustomLog "/var/log/apache2/access.log" combined_proxy'
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/.devcontainer/
/.git/
/.github/
/bin/
/data/
/docs/
/extensions/node_modules/
/extensions/vendor/
/node_modules/
/vendor/
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.min.js
.git/
*.min.js
extensions/
node_modules/
p/scripts/vendor/
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish Docker images

on:
push:
branches:
- edge
release:
workflow_dispatch:

permissions:
contents: read
# packages: write

jobs:
build-container-image:
name: Build Docker image ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Debian
file: Docker/Dockerfile
flavor: |
latest=auto
tags: |
type=edge,onlatest=false
type=semver,pattern={{version}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/0.') }}
# type=semver,pattern={{major}}.{{minor}}
- name: Alpine
file: Docker/Dockerfile-Alpine
flavor: |
latest=false
tags: |
type=raw,value=alpine,enable=${{ github.ref == 'refs/heads/latest' || startsWith(github.ref, 'refs/tags/') }}
type=edge,suffix=-alpine,onlatest=false
type=semver,pattern={{version}}-alpine
type=semver,pattern={{major}}-alpine,enable=${{ !startsWith(github.ref, 'refs/tags/0.') }}
# type=semver,pattern={{major}}.{{minor}}-alpine
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Checkout
uses: actions/checkout@v4

- name: Get FreshRSS version
run: |
FRESHRSS_VERSION=$(sed -n "s/^const FRESHRSS_VERSION = '\(.*\)'.*$/\1/p" constants.php)
echo "$FRESHRSS_VERSION"
echo "FRESHRSS_VERSION=$FRESHRSS_VERSION" >> $GITHUB_ENV
- name: Add metadata to Docker images
id: meta
uses: docker/metadata-action@v5
with:
flavor: ${{ matrix.flavor }}
images: |
docker.io/freshrss/freshrss
# ghcr.io/${{ github.repository }}
tags: ${{ matrix.tags }}
labels: |
org.opencontainers.image.url=https://freshrss.org/
org.opencontainers.image.version=${{ env.FRESHRSS_VERSION }}
- name: Login to Docker Hub
if: github.repository_owner == 'FreshRSS'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
file: ${{ matrix.file }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
build-args: |
FRESHRSS_VERSION=${{ env.FRESHRSS_VERSION }}
SOURCE_COMMIT=${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ (github.ref == 'refs/heads/latest' || github.ref == 'refs/heads/edge' || startsWith(github.ref, 'refs/tags/')) && github.repository_owner == 'FreshRSS' }}
24 changes: 24 additions & 0 deletions .github/workflows/dockerhub-description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Update Docker Hub description

on:
push:
paths:
- Docker/README.md
branches:
- edge
workflow_dispatch:

jobs:
dockerhub-description:
if: github.repository_owner == 'FreshRSS'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Update repo description
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: freshrss/freshrss
readme-filepath: Docker/README.md
51 changes: 51 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: ["edge"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs/
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Git checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4

# Composer tests

Expand Down Expand Up @@ -55,10 +55,10 @@ jobs:
# NPM tests

- name: Uses Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
# https://nodejs.org/en/about/releases/
node-version: '18'
# https://nodejs.org/en/about/previous-releases
node-version: '20'
cache: 'npm'

- run: npm ci
Expand All @@ -82,14 +82,14 @@ jobs:
uses: actions/cache@v3
with:
path: bin
key: ${{ runner.os }}-bin-shfmt@v3.6[email protected]@v1.13.6
key: ${{ runner.os }}-bin-shfmt@v3.7[email protected]@v1.17.0

- name: Add ./bin/ to $PATH
run: mkdir -p bin/ && echo "${PWD}/bin" >> $GITHUB_PATH

- name: Install shfmt
if: steps.shell-cache.outputs.cache-hit != 'true'
run: GOBIN=${PWD}/bin/ go install mvdan.cc/sh/v3/cmd/shfmt@v3.6.0
run: GOBIN=${PWD}/bin/ go install mvdan.cc/sh/v3/cmd/shfmt@v3.7.0

- name: Check shell script syntax
# shellcheck is pre-installed https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2204-Readme.md
Expand All @@ -106,7 +106,7 @@ jobs:
if: steps.shell-cache.outputs.cache-hit != 'true'
run: |
cd bin ;
wget -q 'https://github.com/crate-ci/typos/releases/download/v1.13.6/typos-v1.13.6-x86_64-unknown-linux-musl.tar.gz' &&
wget -q 'https://github.com/crate-ci/typos/releases/download/v1.17.0/typos-v1.17.0-x86_64-unknown-linux-musl.tar.gz' &&
tar -xvf *.tar.gz './typos' &&
chmod +x typos &&
rm *.tar.gz ;
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/bin/
/extensions/node_modules/
/extensions/vendor/
/node_modules/
/vendor/
/data.back/
Expand Down
1 change: 1 addition & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.git/
extensions/
node_modules/
p/scripts/bcrypt.min.js
p/scripts/vendor/
Expand Down
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.git/
extensions/
lib/marienfressinaud/
lib/phpgt/
lib/phpmailer/
Expand Down
23 changes: 12 additions & 11 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,36 @@
"extends": "stylelint-config-recommended-scss",
"plugins": [
"stylelint-order",
"stylelint-scss"
"stylelint-scss",
"stylelint-stylistic"
],
"rules": {
"at-rule-empty-line-before": [
"always", {
"ignoreAtRules": [ "after-comment", "else" ]
}
],
"at-rule-name-space-after": [
"stylistic/at-rule-name-space-after": [
"always", {
"ignoreAtRules": [ "after-comment" ]
}
],
"block-closing-brace-newline-after": [
"stylistic/block-closing-brace-newline-after": [
"always", {
"ignoreAtRules": [ "if", "else" ]
}
],
"block-closing-brace-newline-before": "always-multi-line",
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"stylistic/block-closing-brace-newline-before": "always-multi-line",
"stylistic/block-opening-brace-newline-after": "always-multi-line",
"stylistic/block-opening-brace-space-before": "always",
"stylistic/color-hex-case": "lower",
"color-hex-length": "short",
"color-no-invalid-hex": true,
"declaration-colon-space-after": "always",
"declaration-colon-space-before": "never",
"indentation": "tab",
"stylistic/declaration-colon-space-after": "always",
"stylistic/declaration-colon-space-before": "never",
"stylistic/indentation": "tab",
"no-descending-specificity": null,
"no-eol-whitespace": true,
"stylistic/no-eol-whitespace": true,
"property-no-vendor-prefix": true,
"rule-empty-line-before": [
"always", {
Expand Down
2 changes: 2 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ extend-exclude = [
".git/",
"app/i18n/cz/",
"app/i18n/de/",
"app/i18n/el/",
"app/i18n/es/",
"app/i18n/fa/",
"app/i18n/fr/",
"app/i18n/he/",
"app/i18n/hu/",
"app/i18n/id/",
"app/i18n/it/",
"app/i18n/ja/",
Expand Down
Loading

0 comments on commit 43a13df

Please sign in to comment.