1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searxng_ynh.git synced 2024-09-03 20:26:00 +02:00

Merge pull request #276 from YunoHost-Apps/master-promotion
Some checks failed
Create master promotion pull request / masterPromotion (push) Waiting to run
YunoHost apps package linter / test (push) Has been cancelled

Upgrade master from testing
This commit is contained in:
ewilly 2024-06-09 20:46:56 +00:00 committed by GitHub
commit cca638d1c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 5 deletions

31
.github/workflows/package_linter.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: YunoHost apps package linter
on:
# Allow to manually trigger the workflow
workflow_dispatch:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toml pyparsing six
- name: 'Clone YunoHost apps package linter'
run: |
git clone --depth=1 https://github.com/YunoHost/package_linter ~/package_linter
- name: 'Run linter'
run: |
~/package_linter/package_linter.py .

View file

@ -10,7 +10,7 @@ jobs:
masterPromotion: masterPromotion:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
ref: master ref: master
- name: Reset promotion branch - name: Reset promotion branch

View file

@ -17,7 +17,7 @@
current_version=$(cat manifest.toml | tomlq -j '.version|split("~")[0]') current_version=$(cat manifest.toml | tomlq -j '.version|split("~")[0]')
repo=$(cat manifest.toml | tomlq -j '.upstream.code|split("https://github.com/")[1]') repo=$(cat manifest.toml | tomlq -j '.upstream.code|split("https://github.com/")[1]')
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) # Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
version_raw=$(curl --silent "https://api.github.com/repos/$repo/commits/master" | jq -r ".commit.author.date") version_raw=$(curl --silent "https://api.github.com/repos/$repo/commits/master" | jq -r ".commit.committer.date")
version=$(date -d "$version_raw" +%Y.%m.%d.%H.%M.%S) version=$(date -d "$version_raw" +%Y.%m.%d.%H.%M.%S)
commit_hash=$(curl --silent "https://api.github.com/repos/$repo/commits/master" | jq -r ".sha") commit_hash=$(curl --silent "https://api.github.com/repos/$repo/commits/master" | jq -r ".sha")

View file

@ -14,11 +14,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Fetch the source code - name: Fetch the source code
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Install python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install yq/tomlq - name: Install yq/tomlq
id: install_yq id: install_yq
run: pip install yq run: pip install yq