0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-12-29 07:48:22 -05:00

ci: add ci to rolling from master

This commit is contained in:
neon_arch 2023-05-15 11:06:24 +03:00
commit ccd9177d6b
7 changed files with 293 additions and 42 deletions

85
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@ -0,0 +1,85 @@
# Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community and as such we strongly believe in **give respect and take respect** policy.
# What We Strive At
* **Be patient.**
* **Be welcoming and be friendly**: We strive to be a community that welcomes, supports and remain friendly to people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
* **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.
* **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. Its important to remember that a community where people feel uncomfortable or threatened is not a productive one.
* **Be careful in the words that you choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to:
* Violent threats or language directed against another person.
* Discriminatory jokes and language.
* Using political talks and political orientated views.
* Posting sexually explicit or violent material.
* Posting (or threatening to post) other people's personally identifying information ("doxing").
* Personal insults, especially those using racist or sexist terms.
* Unwelcome sexual attention.
* Advocating for, or encouraging, any of the above behavior.
* Humor is acceptable but should not be done to harass, demean or to insult others.
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
* Using overtly sexual aliases or other nicknames that might detract from a friendly, safe and welcoming environment for all.
* Using bad words or cursing.
* **When we disagree, try to understand why**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that were different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesnt mean that theyre wrong. Dont forget that it is human to err and blaming each other doesnt get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.
* **Treat everyone equally:** we are community of mature people and maturity in the way we act, behave and treat others and as such we treat others as our brothers and sisters.
# Scope
The scope of the conduct of code is not limited to one individual or few individuals. This code of conduct applies for all be it the maintainer, the developer or any role assigned to the project or involved in any other way to the project. This code of conduct is not to provide privelages of one over the other. Any failure to enforce, act, using the code of conduct for your benefit or to evade certain situations or findings way to evade this conduct or a failure to provide a safe environment for others under the umberalla of this code of conduct will be considered a clear act of violation.
# Violation
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
1. **Correction**
**Community Impact:** Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
**Consequence:** A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
2. **Warning**
**Community Impact:** A violation through a single incident or series of actions.
**Consequence:** A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
3. **Temporary Ban**
**Community Impact:** A serious violation of community standards, including sustained inappropriate behavior.
**Consequence:** A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
4. **Permanent Ban**
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the community.
# Reporting Issues
If you experience or witness unacceptable behavior—or have any other concerns—please report it by contacting the community leader via [mustafadhuleb53@gmail.com](mustafadhuleb53@gmail.com). All reports will be handled with discretion. In your report please include:
- Your contact information.
- Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please
include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link.
- Any additional information that may be helpful.
Anyone asked to stop unacceptable behavior is expected to comply immediately. If an individual engages in unacceptable behavior, We will act according to the [violations rules](#violation) as stated above.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html, [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct) and [Twitter's Code of Conduct](https://github.com/twitter/.github/blob/main/code-of-conduct.md?plain=1)
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

22
.github/workflows/labels.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Import open source standard labels
on:
push:
branches:
- master
jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: EddieHubCommunity/gh-action-open-source-labels@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner-name: ${{ github.repository_owner }}
repository-name: ${{ github.event.repository.name }}
force: true # optional to clear existing labels, default to true

74
.github/workflows/releases.yml vendored Normal file
View File

@ -0,0 +1,74 @@
name: Releases
on:
push:
branches:
- "rolling"
concurrency:
group: "rolling-branch"
jobs:
changelog:
if: github.repository == 'neon-mmd/websurfx'
runs-on: ubuntu-latest
steps:
# Create a temporary, uniquely named branch to push release info to
- name: create temporary branch
uses: peterjgrainger/action-create-branch@v2.3.0
id: create-branch
with:
branch: "release-from-${{ github.sha }}"
sha: "${{ github.sha }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# check out the repository afterwards
- uses: actions/checkout@v3
# fetch branches and switch to the temporary branch
- name: switch to new branch
run: git fetch --all && git checkout --track origin/release-from-${{ github.sha }}
# update app config with version
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: update app config
run: sed -i 's/0.0.0/${{ steps.package-version.outputs.current-version}}/g' config/app.json
# create release info and push it upstream
- name: conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version-file: "./Cargo.toml"
git-branch: "release-from-${{ github.sha }}"
skip-on-empty: false
skip-git-pull: true
# create PR using GitHub CLI
- name: create PR with release info
id: create-pr
run: gh pr create --base main --head release-from-${{ github.sha }} --title 'Merge new release into rolling' --body 'Created by Github action'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# merge PR using GitHub CLI
- name: merge PR with release info
id: merge-pr
run: gh pr merge --admin --merge --subject 'Merge release info' --delete-branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# release info is now in main so we can continue as before
- name: create release with last commit
uses: actions/create-release@v1
if: steps.changelog.outputs.skipped == 'false'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}

View File

@ -21,6 +21,20 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ""
shared-key: ""
key: ""
env-vars: ""
workspaces: ""
cache-directories: ""
cache-targets: ""
cache-on-failure: ""
cache-all-crates: ""
save-if: ""
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build
run: cargo build --verbose

26
.github/workflows/rust_format.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Rust format and clippy checks
on:
push:
branches:
- "**"
pull_request:
branches:
- "rolling"
jobs:
check:
name: Rust project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check

27
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,27 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'

View File

@ -1,21 +1,7 @@
<h1 align="center">Websurfx</h1>
<p align="center">
<i>
A modern-looking, lightning-fast, privacy-respecting, secure
<a href="https://en.wikipedia.org/wiki/Metasearch_engine"
>meta search engine</a
>
(pronounced as websurface or web-surface /wɛbˈːrfəs/.) written in Rust. It
provides a fast and secure search experience while respecting user
privacy.</i
>
<br />
<br />
<img align="center" width="500px" src="./images/intro.png" />
<br />
<br />
<b align="center"><a href="README.org">Readme</a></b> |
<b><a href="https://discord.gg/k4GH2TnZ">Discord</a></b> |
<b><a href="https://discord.gg/SWnda7Mw5u">Discord</a></b> |
<b><a href="https://github.com/neon-mmd/websurfx">GitHub</a></b> |
<b><a href="https://github.com/neon-mmd/websurfx/wiki">Documentation</a></b>
<br /><br />
@ -61,6 +47,35 @@
src="https://img.shields.io/github/actions/workflow/status/neon-mmd/websurfx/rust.yml?style=flat-square"
/>
</a>
<a href="">
<img
alt="GitHub release (latest by date including pre-releases)"
src="https://img.shields.io/github/v/release/neon-mmd/websurfx?include_prereleases"
/>
</a>
<a href=""
><img
alt="Maintenance"
src="https://img.shields.io/maintenance/yes/2023?style=flat-square"
/>
</a>
<a href="">
<img
alt="GitHub contributors"
src="https://img.shields.io/github/contributors-anon/neon-mmd/websurfx?style=flat-square"
/>
</a>
<br />
<br />
<i>
A modern-looking, lightning-fast, privacy-respecting, secure
<a href="https://en.wikipedia.org/wiki/Metasearch_engine"
>meta search engine</a
>
(pronounced as websurface or web-surface /wɛbˈːrfəs/.) written in Rust. It
provides a fast and secure search experience while respecting user
privacy.</i
>
</p>
<details>
@ -68,8 +83,8 @@
<p>
- **Getting Started**
- [🌈 Features](#features-)
- [🔭 Preview](#preview-)
- [🌈 Features](#features-)
- [🛠️ Installation and Testing](#installation-and-testing-)
- [🔧 Configuration](#configuration-)
- **Feature Overview**
@ -89,17 +104,6 @@
</p>
</details>
# Features 🌈
- ⛔ Proper NSFW blocking
- 🎨 High level customizability with 9 colorchemes provided by default with a simple theme, also supporting creation of your custom themes and colorschemes very quickly and easily
- 🔍 Advanced image search
- 🔐 Fast, private and secure
- 🆓 100% free and open source
- 🌈 and lots more...
**[⬆️ Back to Top](#websurfx)**
# Preview 🔭
## Main Page
@ -116,9 +120,19 @@
**[⬆️ Back to Top](#websurfx)**
# Features 🌈
- 🎨 High level customizability with 9 colorchemes provided by default with a simple theme, also supporting creation of your custom themes and colorschemes very quickly and easily
- 🔐 Fast, private and secure
- 🆓 100% free and open source
- 🧹 Ad free and clean results
- 🌈 and lots more...
**[⬆️ Back to Top](#websurfx)**
# Installation and Testing 🛠️
> For full setup instructions, see: [**Installation**]()
> For full setup instructions, see: [**Installation**](https://github.com/neon-mmd/websurfx/wiki/installation)
To get started with Websurfx, clone the repository, edit the config file which is located in the `websurfx`{.verbatim} directory and install redis server by following the instructions located [here](https://redis.io/docs/getting-started/) and then run the websurfx server and redis server using the following commands:
@ -130,17 +144,6 @@ redis-server -p 8082 &
./target/debug/websurfx
```
If you want to use the rolling/edge branch, run the following commands instead:
``` shell
git clone https://github.com/neon-mmd/websurfx.git
cd websurfx
git checkout rolling
cargo build
redis-server -p 8082 &
./target/debug/websurfx
```
Once you have started the server, open your preferred web browser and navigate to <http://127.0.0.1:8080> to start using Websurfx.
> **Warning**
@ -150,7 +153,7 @@ Once you have started the server, open your preferred web browser and navigate t
# Configuration 🔧
> For full configuration instructions, see: [**Configuration**]()
> For full configuration instructions, see: [**Configuration**](https://github.com/neon-mmd/websurfx/wiki/configuration)
Websurfx is configured through the config.lua file, located at `websurfx/config.lua`.
@ -158,7 +161,7 @@ Websurfx is configured through the config.lua file, located at `websurfx/config.
# Theming 🎨
> For full theming and customization instructions, see: [**Theming**]()
> For full theming and customization instructions, see: [**Theming**](https://github.com/neon-mmd/websurfx/wiki/theming)
Websurfx comes with several themes and colorschemes by default which you can apply and edit through the config file. Support for custom themes and colorschemes using css and develop your own unique-looking website.
@ -203,7 +206,7 @@ We are looking for more willing contributors to help grow this project.For more
> For full details and other ways you can help out, see: [**Contributing**]()
If you're using Dashy and would like to help support its development, then that would be awesome! Contributions of any type, any size, are always very much appreciated, and we will appropriately credit you for your effort.
If you're using Websurfx and would like to help support its development, then that would be awesome! Contributions of any type, any size, are always very much appreciated, and we will appropriately credit you for your effort.
Several areas that we need a bit of help with at the moment are:
- **Better and more colorchemes** - Help fix colorchemes and add other famous colorchemes.