From e8d342755fdeaaf3e70bcaae54903ac3fecbb4bd Mon Sep 17 00:00:00 2001 From: Hygna Date: Sat, 22 Oct 2022 15:38:32 +0100 Subject: Added linting in CI --- .woodpecker/instances.yml | 5 +++-- .woodpecker/lint.yml | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .woodpecker/lint.yml diff --git a/.woodpecker/instances.yml b/.woodpecker/instances.yml index 43df0cd9..aa73b236 100644 --- a/.woodpecker/instances.yml +++ b/.woodpecker/instances.yml @@ -1,9 +1,10 @@ pipeline: instancefetch: - image: python:3.8 + image: python:alpine secrets: [token, mail] when: - event: cron + - event: cron + cron: instance_updater commands: - python -m pip install --upgrade pip - pip install requests colorama diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 00000000..f1f60e6c --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,10 @@ +pipeline: + lint: + image: node:lts-alpine + when: + event: [push, pull_request] + path: + exclude: [ '.*', '*.md', 'src/instances/**'] + commands: + - npm i + - npx web-ext lint --source-dir ./src/ -- cgit 1.4.1 From f57663db9a71c5317399f19f18aa0f0cde8803f1 Mon Sep 17 00:00:00 2001 From: Hygna Date: Sat, 22 Oct 2022 17:18:35 +0100 Subject: Moved all pipelines to one file --- .woodpecker.yml | 32 ++++++++++++++++++++++++++++++++ .woodpecker/instances.yml | 22 ---------------------- .woodpecker/lint.yml | 10 ---------- woodpecker.yml | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 32 deletions(-) create mode 100644 .woodpecker.yml delete mode 100644 .woodpecker/instances.yml delete mode 100644 .woodpecker/lint.yml create mode 100644 woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 00000000..1ee2cc1e --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,32 @@ +pipeline: + instancefetch: + image: python:alpine + secrets: [token, mail] + when: + - event: cron + cron: instance_updater + commands: + - python -m pip install --upgrade pip + - pip install requests colorama + - python src/instances/get_instances.py + # SSH configuration + - mkdir ~/.ssh + - ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts + - eval `ssh-agent` + - echo "$TOKEN" | tr -d '\r' | ssh-add - + # Git configuration + - git config --global user.email $MAIL + - git config --global user.name "Woodpecker CI" + - git commit -am "updated instances" + - git remote set-url origin git@codeberg.org:libredirect/libredirect.git + - git push --set-upstream origin master + lint: + image: node:lts-alpine + when: + event: [push, pull_request] + path: + exclude: ["src/instances/**"] + include: ["src/"] + commands: + - npm i + - npx web-ext lint --source-dir ./src/ diff --git a/.woodpecker/instances.yml b/.woodpecker/instances.yml deleted file mode 100644 index aa73b236..00000000 --- a/.woodpecker/instances.yml +++ /dev/null @@ -1,22 +0,0 @@ -pipeline: - instancefetch: - image: python:alpine - secrets: [token, mail] - when: - - event: cron - cron: instance_updater - commands: - - python -m pip install --upgrade pip - - pip install requests colorama - - python src/instances/get_instances.py - # SSH configuration - - mkdir ~/.ssh - - ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts - - eval `ssh-agent` - - echo "$TOKEN" | tr -d '\r' | ssh-add - - # Git configuration - - git config --global user.email $MAIL - - git config --global user.name "Woodpecker CI" - - git commit -am "updated instances" - - git remote set-url origin git@codeberg.org:libredirect/libredirect.git - - git push --set-upstream origin master diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml deleted file mode 100644 index f1f60e6c..00000000 --- a/.woodpecker/lint.yml +++ /dev/null @@ -1,10 +0,0 @@ -pipeline: - lint: - image: node:lts-alpine - when: - event: [push, pull_request] - path: - exclude: [ '.*', '*.md', 'src/instances/**'] - commands: - - npm i - - npx web-ext lint --source-dir ./src/ diff --git a/woodpecker.yml b/woodpecker.yml new file mode 100644 index 00000000..1ee2cc1e --- /dev/null +++ b/woodpecker.yml @@ -0,0 +1,32 @@ +pipeline: + instancefetch: + image: python:alpine + secrets: [token, mail] + when: + - event: cron + cron: instance_updater + commands: + - python -m pip install --upgrade pip + - pip install requests colorama + - python src/instances/get_instances.py + # SSH configuration + - mkdir ~/.ssh + - ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts + - eval `ssh-agent` + - echo "$TOKEN" | tr -d '\r' | ssh-add - + # Git configuration + - git config --global user.email $MAIL + - git config --global user.name "Woodpecker CI" + - git commit -am "updated instances" + - git remote set-url origin git@codeberg.org:libredirect/libredirect.git + - git push --set-upstream origin master + lint: + image: node:lts-alpine + when: + event: [push, pull_request] + path: + exclude: ["src/instances/**"] + include: ["src/"] + commands: + - npm i + - npx web-ext lint --source-dir ./src/ -- cgit 1.4.1