From 4f6ac209ddf87b77e374b054e9981d3cd276d884 Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 15:37:18 +0700 Subject: [PATCH 1/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c2d1fc71ac7..0c480b4dc0e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Osmosis +this is a brken link: https://notion.notional.ventures/the-hub + ![Banner!](assets/banner.png) [![Project Status: Active -- The project has reached a stable, usable From 1bccf6bea554f3e22ecda426a25712afe2b656e4 Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 15:48:05 +0700 Subject: [PATCH 2/9] Create check-broken-links.yml --- .github/workflows/check-broken-links.yml | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/check-broken-links.yml diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml new file mode 100644 index 00000000000..c34cc1aeb67 --- /dev/null +++ b/.github/workflows/check-broken-links.yml @@ -0,0 +1,43 @@ +name: Check Links + +on: + schedule: + - cron: '0 0 * * *' # Run daily at 00:00 UTC + workflow_dispatch: # Allow manual triggering of the workflow + +jobs: + check_links: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Install lychee + run: cargo install lychee + + - name: Check links in Markdown files + run: lychee --verbose --no-progress "**/*.md" || echo 'lychee failed with exit code $?.' + continue-on-error: true + + - name: Create or update issue + uses: peter-evans/create-or-update-comment@v1 + with: + token: ${{ secrets.TOKEN }} + issue-number: 12 + body: | + ## :warning: Broken links detected + + The following broken links were found in the Markdown files: + + ``` + ${{ steps.check_links.outputs.stdout }} + ``` + + Please fix these broken links as soon as possible. From db59dd6bca35b97ee148e70b0aa6055b57e78a1a Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 16:42:12 +0700 Subject: [PATCH 3/9] Update check-broken-links.yml --- .github/workflows/check-broken-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml index c34cc1aeb67..5ad683105f2 100644 --- a/.github/workflows/check-broken-links.yml +++ b/.github/workflows/check-broken-links.yml @@ -23,7 +23,7 @@ jobs: run: cargo install lychee - name: Check links in Markdown files - run: lychee --verbose --no-progress "**/*.md" || echo 'lychee failed with exit code $?.' + run: lychee --verbose --no-progress "**/*.md" 2>&1 || echo 'lychee failed with exit code $?.' continue-on-error: true - name: Create or update issue From 5ba28412cef687f4e483b43d2e446b294b41cd0a Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 16:52:39 +0700 Subject: [PATCH 4/9] Update check-broken-links.yml --- .github/workflows/check-broken-links.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml index 5ad683105f2..65dceddcac6 100644 --- a/.github/workflows/check-broken-links.yml +++ b/.github/workflows/check-broken-links.yml @@ -23,7 +23,10 @@ jobs: run: cargo install lychee - name: Check links in Markdown files - run: lychee --verbose --no-progress "**/*.md" 2>&1 || echo 'lychee failed with exit code $?.' + run: | + output=$(lychee --verbose --no-progress "**/*.md" 2>&1) || true + echo "::set-output name=lychee_output::$output" + id: check_links continue-on-error: true - name: Create or update issue From 8cb6abb92a51ab52863ef08a6b7fa8cdeb4c51cb Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 17:04:34 +0700 Subject: [PATCH 5/9] Update check-broken-links.yml --- .github/workflows/check-broken-links.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml index 65dceddcac6..0bc7b71e310 100644 --- a/.github/workflows/check-broken-links.yml +++ b/.github/workflows/check-broken-links.yml @@ -25,10 +25,18 @@ jobs: - name: Check links in Markdown files run: | output=$(lychee --verbose --no-progress "**/*.md" 2>&1) || true - echo "::set-output name=lychee_output::$output" + echo "$output" | tee lychee_output.txt id: check_links continue-on-error: true + - name: Get lychee output + run: | + if [[ -s lychee_output.txt ]]; then + cat lychee_output.txt + else + echo "No broken links found." + fi + - name: Create or update issue uses: peter-evans/create-or-update-comment@v1 with: From 3c0c593c5b7e9c1e2f963cc9dedfde2ce015c96e Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 17:20:00 +0700 Subject: [PATCH 6/9] Update check-broken-links.yml --- .github/workflows/check-broken-links.yml | 38 ++++++++---------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml index 0bc7b71e310..7f0988fedeb 100644 --- a/.github/workflows/check-broken-links.yml +++ b/.github/workflows/check-broken-links.yml @@ -9,33 +9,21 @@ jobs: check_links: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Install Rust - uses: actions-rs/toolchain@v1 + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1.6.1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Create Issue From File + if: env.lychee_exit_code != 0 + uses: peter-evans/create-issue-from-file@v4 with: - profile: minimal - toolchain: stable - override: true - - - name: Install lychee - run: cargo install lychee - - - name: Check links in Markdown files - run: | - output=$(lychee --verbose --no-progress "**/*.md" 2>&1) || true - echo "$output" | tee lychee_output.txt - id: check_links - continue-on-error: true - - - name: Get lychee output - run: | - if [[ -s lychee_output.txt ]]; then - cat lychee_output.txt - else - echo "No broken links found." - fi + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: report, automated issue - name: Create or update issue uses: peter-evans/create-or-update-comment@v1 From 83eef25a9393624dd866a22ad45b2e800e52c266 Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 17:33:16 +0700 Subject: [PATCH 7/9] Update check-broken-links.yml --- .github/workflows/check-broken-links.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml index 7f0988fedeb..0e91393393a 100644 --- a/.github/workflows/check-broken-links.yml +++ b/.github/workflows/check-broken-links.yml @@ -14,6 +14,8 @@ jobs: - name: Link Checker id: lychee uses: lycheeverse/lychee-action@v1.6.1 + with: + args: --accept 200,429,err,ERR env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} From 664530db86a90607d13d7fc42d0e060d04c98d44 Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 17:36:57 +0700 Subject: [PATCH 8/9] Update check-broken-links.yml --- .github/workflows/check-broken-links.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml index 0e91393393a..1f68178db8b 100644 --- a/.github/workflows/check-broken-links.yml +++ b/.github/workflows/check-broken-links.yml @@ -14,8 +14,6 @@ jobs: - name: Link Checker id: lychee uses: lycheeverse/lychee-action@v1.6.1 - with: - args: --accept 200,429,err,ERR env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} @@ -26,19 +24,3 @@ jobs: title: Link Checker Report content-filepath: ./lychee/out.md labels: report, automated issue - - - name: Create or update issue - uses: peter-evans/create-or-update-comment@v1 - with: - token: ${{ secrets.TOKEN }} - issue-number: 12 - body: | - ## :warning: Broken links detected - - The following broken links were found in the Markdown files: - - ``` - ${{ steps.check_links.outputs.stdout }} - ``` - - Please fix these broken links as soon as possible. From 261a4daff9e105bc4b7e7b451fa9a791c47f9c1a Mon Sep 17 00:00:00 2001 From: Master Pi Date: Thu, 23 Mar 2023 17:40:36 +0700 Subject: [PATCH 9/9] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 0c480b4dc0e..c2d1fc71ac7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Osmosis -this is a brken link: https://notion.notional.ventures/the-hub - ![Banner!](assets/banner.png) [![Project Status: Active -- The project has reached a stable, usable