95 Commits

Author SHA1 Message Date
Ivan Gabaldon
cd64fb966e [enh] container: support multiple registries
Allows to push the manifests to other registries, this allows to push both docker.io and ghcr.io registries.
2025-05-15 11:37:18 +02:00
Ivan Gabaldon
743f24d8c6 [fix] CI: commit author should be searxng-bot
If the workflow is executed with the "workflow_dispatch" trigger, the user who executed the workflow becomes the author of the commit on the PR, this is not intended.

It also reverts the body param so that the default text of the action does not appear.
2025-05-15 11:19:28 +02:00
Ivan Gabaldon
bec76bc2e3 [fix] CI: prevent race condition
`checker.yml` and `integration.yml` are the only workflows that are currently safe to be executed simultaneously, the others present a risk that the order of completion may not be expected. The ones that are chained from `integration.yml` can be called as many times as `integration.yml` workflows are running at that moment, the same with the trigger "workflow_dispatch".

This can be fatal for workflows like `container.yml` that use a centralized cache to store and load the candidate images in a common tag called "searxng-<arch>".

* For example, a `container.yml` workflow is executed after being chained from `integration.yml` (called "~1"), and seconds later it may be triggered again because another PR merged some breaking changes (called "~2"). While "~1" has already passed the test job successfully and is about to start the release job, "~2" finishes building the container and overwrites the references on the common tag. When "~1" in the release job loads the images using the common tag, it will load the container of "~2" instead of "~1" having skipped the whole test job process.

The example is only set for the container workflow, but the other workflows might occur in a similar way.
2025-05-15 11:19:28 +02:00
Ivan Gabaldon
d0b7f26f4b [fix] CI: container-mounts bad hash
This is a typo, but if there are multiple patterns in hashFiles, they should be separated by commas.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#examples-with-multiple-patterns
2025-05-15 11:19:28 +02:00
Ivan Gabaldon
b42f812c57
[fix] CI: handle old cache images from registry
Currently, we have 1100~ cache images uploaded to GHCR that weigh more than 300 MB each (most of them are layers from the second phase of the Dockerfile that were uploaded by mistake, read below). To avoid problems, I have set up a new job in a new workflow to be run weekly purging all images older than 1 week, but leaving always the 100 most recent ones.

Only the builder images should be uploaded to cache, the actual behaviour not only slows down the time for building the container, but also wastes lots of space by saving large and useless layers to GHCR that will never be used again.
2025-05-14 22:42:36 +02:00
Ivan Gabaldon
5d99373bc6
[fix] DOCKERHUB_USERNAME env reference (#4778)
When making the container rework, I unknowingly deleted the section where an env with the same name as the secret was defined on the job scope, making it look like it was originally defined as an organization env.

Since we can't validate the secrets in a condition directly, it's better to let docker/login-action take care of failing the entire job if the credentials are invalid.

Reported in: https://github.com/searxng/searxng/issues/4777
2025-05-12 23:43:47 +02:00
Ivan Gabaldon
da3c640cef revert using null keyword
env.DOCKERHUB_USERNAME shouldn't be an empty string as it's defined and set (I think, I can't see this). Even if wasn't defined, GitHub Org/Repo wide envs/secrets should return an empty string (?)
2025-05-11 19:28:51 +02:00
Ivan Gabaldon
d16854e67a
[mod] rework container deployment (#4764)
container.yml will run after integration.yml COMPLETES successfully and in master branch.

Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows.

* Podman is now supported to build the container images (Docker also received a refactor, merging both build and buildx)
* Container images are being built by Buildah instead of Docker BuildKit.
* Container images are tested before release.
* Splitting "modern" (amd64 & arm64) and "legacy" (armv7) arches on different Dockerfiles allowing future optimizations.
2025-05-11 18:12:51 +02:00
Ivan Gabaldon
1b787ed35e
[mod] refactor integration.yml (#4763)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows.
2025-05-10 13:59:31 +02:00
Ivan Gabaldon
8e2e7774d7
[mod] new l10n.yml workflow (#4734)
l10n.yml will run after integration.yml finishes successfully (will defer anything depending on integration.yml until heavy loads like container building are moved to separate workflows) and in master branch.

* After every integration.yml workflow completes successfully, only the `update` job runs.
* Dispatch and Crontab triggers only the `pr` job.

Style changes, cleanup and improved integration with CI by leveraging the use of shared cache between all workflows (not functional until all workflows have been refactored).
2025-05-10 13:08:20 +02:00
Ivan Gabaldon
e982b9f732 [fix] documentation should run on push/pr
Instead of executing the workflow after integration.yml completes correctly, let's run this workflow parallel to integration.yml restoring the original behaviour.
2025-05-10 07:41:42 +02:00
Ivan Gabaldon
743f90514b
[fix] missing PR perm data-update.yml workflow (#4737)
We actually don't need to keep the token on checkout because `peter-evans/create-pull-request` will read from `github.token`. The obvious `pull-requests` write permission wasn't set in the last fix, so I added it now.
2025-05-08 23:55:23 +02:00
Ivan Gabaldon
48801dbc9a
[mod] CI move build of online docs to dedicated workflow documentation.yml (#4733)
documentation.yml will run after integration.yml COMPLETES successfully (will
defer anything depending on integration.yml until heavy loads like container
building are moved to separate workflows) and in master branch.

Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 17:40:05 +02:00
Ivan Gabaldon
5451ab243a
[fix] fix security.yml workflow (#4735)
Uploading SARIFs needs to write into the repository GitHub security tab
2025-05-08 17:13:07 +02:00
Ivan Gabaldon
7ca24eee45
[fix] missing perm data-update.yml workflow (#4736)
We need to keep the token on checkout and allow writing into the repository to create the branch
2025-05-08 16:51:21 +02:00
Ivan Gabaldon
c6a70782b2
[mod] CI: refactor data-update.yml - searxng_extra/update scripts (#4732)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 15:13:22 +02:00
Ivan Gabaldon
01a07f34b2
[mod] CI refactor security.yml - style and cleanup changes (#4731) 2025-05-08 14:44:22 +02:00
Ivan Gabaldon
f32fcb1243
[mod] CI: refactor checker.yml - make search.checker (#4730)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 13:58:06 +02:00
Markus Heiser
6500d73714 [web-client] integrate the migrated theme in the github CI
- upgrade to ubuntu-24.04 to get NodeJS v20
- remove DEBUG (V=1) environment / in a ViteJS env the DEBUG environment is
  reserved for interactive debugging tasks (not for verbose build messages).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
d45dea56c5 [fix] selenium: binary is not a Firefox executable
Since Ubuntu installs firefox frrom snap, we can't use any longer
``Browser('firefox')``.

[1] https://github.com/searxng/searxng/pull/3663#issuecomment-2255963036
[2] https://splinter.readthedocs.io/en/latest/drivers/firefox.html#custom-binary-path

Suggested-by: @allendema
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-07 17:05:06 +01:00
Markus Heiser
8c610404bd [upd] upgrade: github actions / to ubuntu: 24.04 / to nvm: node 20.15
- ubuntu-20.04 --> ubuntu-24.04

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-07 17:05:06 +01:00
Markus Heiser
3749154660 [mod] add support for Python 3.13
Python 3.13 has been released [1]

- fasttext-predict supports py3.13 from version 0.9.2.3 [2]

[1] https://www.python.org/downloads/release/python-3130/
[2] https://github.com/searxng/fasttext-predict/commit/f2da9cd173

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-24 19:46:04 +01:00
Markus Heiser
7927baf545 [upd] github CI: actions/cache@v3 to actions/cache@v4
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-24 14:07:07 +01:00
Markus Heiser
c4055e449f [fix] issues reported by make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-06 08:16:21 +01:00
Markus Heiser
56e3d72a76 [fix] CI: remove target test.coverage from python's test matrix
The test.coverage cause a lot of failed CI jobs for reasons that cannot be
explained.  As we do not monitor the coverage anyway, it is superfluous to run
this job, especially as it only has a disruptive effect on the CI.

BTW and the CI action upload-artifact@v3 is deprecated [1]

[1] https://github.com/actions/upload-artifact?tab=readme-ov-file#actionsupload-artifact

Related: https://github.com/searxng/searxng/issues/3983
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-01 10:14:57 +01:00
Markus Heiser
2fd6730d4f [mod] py3.8 EOL / upgrade to actions/setup-python@v5
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-03 13:05:43 +02:00
Christian Clauss
837f3bcd10 GitHub Actions: Upgrade data-update.yml infrastructure 2024-06-25 15:26:05 +02:00
Markus Heiser
691390b443 [fix] CI YAML config files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 14:56:12 +01:00
Markus Heiser
a48da9b28a [fix] CI YAML config files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 14:08:00 +01:00
Markus Heiser
18028f3c13 [mod] CI: tag commits with leading scope/type of the modification
Add a leading tag (in square brackets) about the scope/type to commit messages
from automated tasks (commits from CI).

dependantbot::

    [upd] pypi: Bump .. from .. to ..
    [upd] npm: Bump .. from .. to .. in /searx/static/themes/simple

Weblate translation updates::

    [l10n] update translations from Weblate

updates of ./data::

    [data] update searx.data ...

build commit of gh-pages::

    [doc] build from commit ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 12:17:23 +01:00
Alexandre Flament
08e7c37a35 GitHub workflows: run checker on Friday 2024-03-03 11:18:43 +01:00
Markus Heiser
f9c5727ddc [mod] get rid of ./utils/brand.env and its workflow
All the environments defined in ./utils/brand.env are generated on the fly, so
there is no longer a need to define the brand environment in this file and all
the workflows to handle this file.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-09 16:31:19 +01:00
Alexandre Flament
9aeae2142b Add support for Python 3.12 2023-10-29 11:25:58 +01:00
Markus Heiser
b56db4e04e [CI] upgrade actions/checkout@v4 & actions/upload-artifact@v3
Closes: https://github.com/searxng/searxng/issues/2777#issuecomment-1720958570
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-15 14:45:54 +02:00
ToxyFlog1627
f175574f37 [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
Markus Heiser
fc8bd98c59 [CI] drop Python 3.7 from CI
- Python 3.7 supports security fixes only, as needed, until 2023-06 [1]
- Some of SearXNG's dependencies do no longer support Python 3.7 [2]

[1] https://peps.python.org/pep-0537/#and-beyond-schedule
[2] https://github.com/searxng/searxng/pull/2102

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-04-19 14:55:17 +02:00
Markus Heiser
6e5f22e558 [mod] replace engines_languages.json by engines_traits.json
Implementations of the *traits* of the engines.

Engine's traits are fetched from the origin engine and stored in a JSON file in
the *data folder*.  Most often traits are languages and region codes and their
mapping from SearXNG's representation to the representation in the origin search
engine.

To load traits from the persistence::

    searx.enginelib.traits.EngineTraitsMap.from_data()

For new traits new properties can be added to the class::

    searx.enginelib.traits.EngineTraits

.. hint::

   Implementation is downward compatible to the deprecated *supported_languages
   method* from the vintage implementation.

   The vintage code is tagged as *deprecated* an can be removed when all engines
   has been ported to the *traits method*.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-03-24 10:37:42 +01:00
nathannaveen
b5ce39b536 chore: Set permissions for GitHub actions (#3225)
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
2022-11-04 16:50:43 +00:00
Alexandre FLAMENT
7101c5ecf2 GH workflow: add Python 3.11 2022-11-04 14:28:46 +00:00
Alexandre FLAMENT
46aaa57cfe GH workflow: use actions/cache@v3
Also cache ./.nvm and ./node_modules
2022-11-04 14:25:15 +00:00
Alexandre FLAMENT
bc1278d25e GH workflow: use actions/setup-python@v4
GitHub displays this warning with the actions/setup-python@2 :

Warning: The `set-output` command is deprecated and will be disabled soon.
Please upgrade to using Environment Files.
For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2022-11-04 08:37:31 +00:00
Alexandre FLAMENT
1f78445d88 GitHub worfklow: add daily security check using trivy 2022-08-31 18:38:59 +00:00
Markus Heiser
692708aa77 [clean up] drop obsolete searx, filtron and morty install scripts
Since ./utils/searxng.sh is implemented, the old installation procedures from
filtron, morty and searx can be removed.

For users who want to upgrade, the procedures for removing old installations
have still been retained.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-30 13:39:35 +02:00
Alexandre Flament
e5cc3e36ad
Update data-update.yml
See #1271
2022-06-27 15:01:23 +02:00
Alexandre Flament
52d3d2fb42
data-update.yml: updated on the 28th of the month
Administrators of public instances are incentivised to update their instances on the 1st of the month.

With this commit, the data are up to date by the 1st of the next month.
2022-06-02 21:18:58 +02:00
Alexandre Flament
ec59a1580c GitHub monthly data update: add engine descriptions 2022-04-16 13:16:27 +02:00
Alexandre Flament
1f7059e040 [mod] GitHub workflow: use cache 2022-01-05 20:59:59 +01:00
Alexandre Flament
34b820a87d [fix] PR #646 2021-12-23 22:08:45 +01:00
Markus Heiser
cb1b6686f0 [ci] drop Python 3.6
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-23 10:09:23 +01:00
Alexandre Flament
7bd9cd51d0 integration.yml : python 3.10 2021-10-08 10:03:12 +02:00