From ef26f816058b23b6690eb3231b428d14f485a3b5 Mon Sep 17 00:00:00 2001 From: daywalker90 <8257956+daywalker90@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:43:54 +0200 Subject: [PATCH 1/2] adding clnrod --- .gitmodules | 3 +++ README.md | 2 ++ clnrod | 1 + 3 files changed, 6 insertions(+) create mode 160000 clnrod diff --git a/.gitmodules b/.gitmodules index 8d6b793b..ffe23100 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,3 +46,6 @@ [submodule "bolt12-prism"] path = bolt12-prism url = https://github.com/gudnuf/bolt12-prism.git +[submodule "clnrod"] + path = clnrod + url = https://github.com/daywalker90/clnrod.git diff --git a/README.md b/README.md index 3fdd537a..46487d9b 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Community curated plugins for Core-Lightning. | [circular][circular] | A smart rebalancing plugin for Core Lightning routing nodes | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fcircular_main.json) | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fcircular_nightly.json) | | [clearnet][clearnet] | A plugin that can be used to enforce clearnet connections when possible | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fclearnet_main.json) | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fclearnet_nightly.json) | | [cln-ntfy][cln-ntfy] | Core Lightning plugin for sending `ntfy` alerts. | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fcln-ntfy_main.json) | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fcln-ntfy_nightly.json) | +| [clnrod][clnrod] | Channel acceptor plugin. Configurable with external data from amboss/1ml and notifications | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fclnrod_main.json) | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fclnrod_nightly.json) | | [currencyrate][currencyrate] | A plugin to convert other currencies to BTC using web requests | | | | [datastore][datastore] | The Datastore Plugin | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fdatastore_main.json) | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fdatastore_nightly.json) | | [donations][donations] | A simple donations page to accept donations from the web | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fdonations_main.json) | ![](https://img.shields.io/endpoint?url=https%3A%2F%2Flightningd.github.io%2Fplugins%2F.badges%2Fdonations_nightly.json) | @@ -204,6 +205,7 @@ Python plugins developers must ensure their plugin to work with all Python versi [circular]: https://github.com/giovannizotta/circular [clearnet]: https://github.com/lightningd/plugins/tree/master/clearnet [cln-ntfy]: https://github.com/yukibtc/cln-ntfy +[clnrod]: https://github.com/daywalker90/clnrod [commando]: https://github.com/lightningd/plugins/tree/master/archived/commando [cpp-api]: https://github.com/darosior/lightningcpp [csharp-example]: https://github.com/joemphilips/DotNetLightning/tree/master/examples/HelloWorldPlugin diff --git a/clnrod b/clnrod new file mode 160000 index 00000000..73851fda --- /dev/null +++ b/clnrod @@ -0,0 +1 @@ +Subproject commit 73851fda648ff178591e34838e09a922b7589a6a From 1c49c0ac4b17aa7485df65db4c8797836f4637b1 Mon Sep 17 00:00:00 2001 From: daywalker90 <8257956+daywalker90@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:47:08 +0200 Subject: [PATCH 2/2] CI: refactor to return success on ignored paths --- .github/workflows/main.yml | 83 ++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 32efca0f..0f05005e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,25 +8,7 @@ concurrency: on: push: branches: [ master ] - paths-ignore: - - '*.md' - - '*.toml' - - '*.yml' - - '*.lock' - - 'Dockerfile' - - '.gitignore' - - 'LICENSE' - - 'archived/**' pull_request: - paths-ignore: - - '*.md' - - '*.toml' - - '*.yml' - - '*.lock' - - 'Dockerfile' - - '.gitignore' - - 'LICENSE' - - 'archived/**' jobs: build-and-test: @@ -46,7 +28,44 @@ jobs: with: submodules: recursive + - name: Get changed files + id: get_changed_files + if: ${{ github.event_name == 'pull_request' }} + uses: tj-actions/changed-files@v44 + with: + files: '**/*' + files_ignore: | + *.md + *.toml + *.yml + *.lock + Dockerfile + .gitignore + LICENSE + archived/** + + - name: Set plugin_dirs + id: set_plugin_dirs + if: ${{ github.event_name == 'pull_request' }} + run: | + changed_files=$(echo "${{ steps.get_changed_files.outputs.all_changed_files }}" | tr ',' '\n') + plugin_dirs="" + for file in $changed_files; do + dir=$(dirname "$file" | cut -d'/' -f1) + if [[ "$dir" != "." && "${dir:0:1}" != "." && ! " ${plugin_dirs[@]} " =~ " ${dir} " ]]; then + plugin_dirs="${plugin_dirs} ${dir}" + fi + done + echo "plugin_dirs=${plugin_dirs}" >> "$GITHUB_OUTPUT" + + if [[ -n "${{ steps.get_changed_files.outputs.all_changed_files }}" ]]; then + echo "run_ci=true" >> "$GITHUB_OUTPUT" + else + echo "run_ci=false" >> "$GITHUB_OUTPUT" + fi + - name: Download Bitcoin ${{ matrix.bitcoind-version }} & install binaries + if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }} run: | export BITCOIND_VERSION=${{ matrix.bitcoind-version }} wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIND_VERSION}/bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz @@ -55,6 +74,7 @@ jobs: rm -rf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz bitcoin-${BITCOIND_VERSION} - name: Download Core Lightning latest & install binaries + if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }} id: cln-latest-install run: | url=$(curl -s https://api.github.com/repos/ElementsProject/lightning/releases/latest \ @@ -65,6 +85,7 @@ jobs: echo "CLN_VERSION=$(lightningd --version)" >> "$GITHUB_OUTPUT" - name: Checkout Core Lightning latest + if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }} uses: actions/checkout@v4 with: repository: 'ElementsProject/lightning' @@ -74,6 +95,7 @@ jobs: submodules: 'recursive' - name: Install Core Lightning Python package dependencies + if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }} run: | sudo apt-get install -y \ python3 \ @@ -95,33 +117,14 @@ jobs: pip install --user contrib/pyln-client contrib/pyln-testing flaky - name: Set up Python ${{ matrix.python-version }} + if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Get changed files - id: get_changed_files - if: ${{ github.event_name == 'pull_request' }} - uses: tj-actions/changed-files@v44 - with: - files: '**/*' - - - name: Set plugin_dirs - id: set_plugin_dirs - if: ${{ github.event_name == 'pull_request' }} - run: | - changed_files=$(echo "${{ steps.get_changed_files.outputs.all_changed_files }}" | tr ',' '\n') - plugin_dirs="" - for file in $changed_files; do - dir=$(dirname "$file" | cut -d'/' -f1) - if [[ "$dir" != "." && "${dir:0:1}" != "." && ! " ${plugin_dirs[@]} " =~ " ${dir} " ]]; then - plugin_dirs="${plugin_dirs} ${dir}" - fi - done - echo "plugin_dirs=${plugin_dirs}" >> "$GITHUB_OUTPUT" - - name: Run pytest tests id: pytest_tests + if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }} run: | export CLN_PATH=${{ github.workspace }}/lightning export COMPAT=${{ matrix.deprecated }} @@ -160,7 +163,7 @@ jobs: # A dummy task that depends on the full matrix of tests, and signals completion. name: CI completion runs-on: ubuntu-22.04 - if: ${{ always() }} + if: ${{ always() && github.event_name == 'push' }} needs: - build-and-test steps: