🍽 Fork YunoHost — snapshot mangé par la machine à tsoins
Upstream: https://github.com/YunoHost/yunohost @ 3a5f8bac8301c450897b96cbd43a4c7d3ba750fb But (José) : transformer tout le code en bions + ploxions du xerboxion. La carte de digestion vit au labo : /yunohost-digest.json
This commit is contained in:
41
.github/workflows/auto-format.yml
vendored
Normal file
41
.github/workflows/auto-format.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Format Python code with Ruff, and Bash code with Shfmt
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "dev" ]
|
||||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run Shfmt on Bash files
|
||||
uses: collin-miller/shfmt-action@v1
|
||||
with:
|
||||
# -i=4 # indent
|
||||
# -kp # keep column alignment paddings
|
||||
# -sr # redirect operators will be followed by a space
|
||||
# -bn # binary ops like && and | may start a line
|
||||
# -ci # switch cases will be indented
|
||||
# -w # write to file instead of stdout
|
||||
args: -i=4 -kp -sr -bn -ci -w hooks/ helpers/helpers helpers/helpers.v1.d/ helpers/helpers.v2.1.d/
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run Ruff on Python files for import sorting
|
||||
# See https://docs.astral.sh/ruff/formatter/#sorting-imports
|
||||
uses: astral-sh/ruff-action@v3
|
||||
with:
|
||||
args: "check --select I --fix"
|
||||
|
||||
- name: Run Ruff on Python files
|
||||
uses: astral-sh/ruff-action@v3
|
||||
with:
|
||||
args: "format"
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: ":art: ${{ github.workflow }}"
|
||||
58
.github/workflows/auto-lint.yml
vendored
Normal file
58
.github/workflows/auto-lint.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Run code lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "dev" ]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
python-lint:
|
||||
name: Python lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.11
|
||||
|
||||
- name: Install tox and any other packages
|
||||
run: pip install tox toml pyyaml
|
||||
|
||||
- if: success() || failure()
|
||||
run: tox -e py311-lint
|
||||
|
||||
- if: success() || failure()
|
||||
run: tox -e py311-invalidcode
|
||||
|
||||
- if: success() || failure()
|
||||
run: tox -e py311-mypy
|
||||
|
||||
- name: Check i18n keys
|
||||
if: success() || failure()
|
||||
run: python3 maintenance/missing_i18n_keys.py check
|
||||
|
||||
|
||||
bash-lint:
|
||||
name: Bash lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Run ShellCheck
|
||||
uses: salamandar/action-shellcheck@master
|
||||
with:
|
||||
additional_files: |
|
||||
bin/yunoprompt
|
||||
debian/postinst
|
||||
debian/postrm
|
||||
debian/prerm
|
||||
hooks/*/*
|
||||
tests
|
||||
helpers/helpers.v2.1.d/*
|
||||
|
||||
ignore_paths:
|
||||
tests/test_helpers.v2.d
|
||||
helpers/vendor
|
||||
src/vendor
|
||||
42
.github/workflows/codeql.yml
vendored
Normal file
42
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "dev" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "dev" ]
|
||||
paths-ignore:
|
||||
- 'tests/**'
|
||||
schedule:
|
||||
- cron: '43 12 * * 3'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'python' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
queries: security-extended,security-and-quality
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
39
.github/workflows/n_updater.yml
vendored
Normal file
39
.github/workflows/n_updater.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# This workflow allows GitHub Actions to automagically update YunoHost NodeJS helper whenever a new release of n is detected.
|
||||
name: Check for new n releases
|
||||
on:
|
||||
# Allow to manually trigger the workflow
|
||||
workflow_dispatch:
|
||||
# Run it every day at 5:00 UTC
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
jobs:
|
||||
updater:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fetch the source code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run the updater script
|
||||
id: run_updater
|
||||
run: |
|
||||
# Download n
|
||||
wget https://raw.githubusercontent.com/tj/n/master/bin/n --output-document=helpers/vendor/n/n
|
||||
|
||||
echo "VERSION=$(sed -n 's/^VERSION=\"\(.*\)\"/\1/p' < helpers/vendor/n/n)" >> $GITHUB_ENV
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
id: cpr
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Update n to ${{ env.VERSION }}
|
||||
committer: 'yunohost-bot <yunohost-bot@users.noreply.github.com>'
|
||||
author: 'yunohost-bot <yunohost-bot@users.noreply.github.com>'
|
||||
signoff: false
|
||||
base: dev
|
||||
branch: ci-auto-update-n-${{ env.VERSION }}
|
||||
delete-branch: true
|
||||
title: 'Upgrade n to ${{ env.VERSION }}'
|
||||
body: |
|
||||
Upgrade `n` to ${{ env.VERSION }}
|
||||
draft: false
|
||||
35
.github/workflows/releases_from_tags.yaml
vendored
Normal file
35
.github/workflows/releases_from_tags.yaml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Automatically write releases when tags appear
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ "debian/*" ]
|
||||
|
||||
|
||||
jobs:
|
||||
pre-release:
|
||||
name: Generate releases
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 0 # Fetch all tags
|
||||
|
||||
- name: Patch tag name
|
||||
id: patch-tag-name
|
||||
run: echo "version=$(echo ${{ github.ref }} | sed 's|refs/tags/debian/||')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create Release for Tag
|
||||
id: release_tag
|
||||
uses: epreston/release-tag@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
release_name: YunoHost ${{ steps.patch-tag-name.outputs.version }}
|
||||
tag_name: ${{ github.ref }}
|
||||
body: |
|
||||
Refer to [the debian changelog](${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref }}/debian/changelog) for details.
|
||||
Reference in New Issue
Block a user