From 24dfa8e46e48ed858e4d7fce28de46824490db55 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Dec 2024 16:00:18 +0100 Subject: [PATCH 01/33] feat(gen): test updated actions workflow --- .github/workflows/link-check-schedule.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index cc6ca57d52..03bc663b0f 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -1,12 +1,17 @@ name: Check links on schedule on: schedule: - - cron: "30 15 * * *" # Runs every Monday at 09:00 AM + - cron: "59 23 * * 0" # Runs every Sunday at 23:59 + push: # for testing purposes, do not merge jobs: linkcheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: filiph/linkcheck@3.0.0 + id: check_links with: - arguments: https://www.scaleway.com/en/docs/ + arguments: https://www.scaleway.com/en/docs/ >> $GITHUB_OUTPUT + - name: Print output + run: | + echo "${{steps.check_links.outputs.*}}" From b3da1f70a73f9d935524d558fc10070a07618a0c Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Dec 2024 16:12:04 +0100 Subject: [PATCH 02/33] feat(gen): test updated actions workflow --- .github/workflows/link-check-schedule.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 03bc663b0f..04118509f5 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -11,7 +11,9 @@ jobs: - uses: filiph/linkcheck@3.0.0 id: check_links with: - arguments: https://www.scaleway.com/en/docs/ >> $GITHUB_OUTPUT - - name: Print output - run: | - echo "${{steps.check_links.outputs.*}}" + arguments: https://www.scaleway.com/en/docs/serverless/jobs/ >> linkcheck_output.txt + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.4.3 + with: + name: linkcheck_output.txt + path: . From 77649bad27ddf10926e618d64a546a15a0bfeef5 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Dec 2024 17:10:40 +0100 Subject: [PATCH 03/33] feat(gen): test updated actions workflow --- .github/workflows/link-check-schedule.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 04118509f5..60697e599a 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -7,13 +7,11 @@ jobs: linkcheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - uses: filiph/linkcheck@3.0.0 - id: check_links with: arguments: https://www.scaleway.com/en/docs/serverless/jobs/ >> linkcheck_output.txt - name: Upload a Build Artifact uses: actions/upload-artifact@v4.4.3 with: name: linkcheck_output.txt - path: . + path: linkcheck_output.txt From 874f92d7bb7d732f8dc743e393dbe90b861fa4fc Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Dec 2024 17:12:08 +0100 Subject: [PATCH 04/33] feat(gen): test updated actions workflow --- .github/workflows/link-check-schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 60697e599a..32edb61fdf 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: filiph/linkcheck@3.0.0 with: - arguments: https://www.scaleway.com/en/docs/serverless/jobs/ >> linkcheck_output.txt + arguments: https://www.scaleway.com/en/docs/ >> linkcheck_output.txt - name: Upload a Build Artifact uses: actions/upload-artifact@v4.4.3 with: From 8e36d13c799201b0f1a44e48517f20562ebbe7ad Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Dec 2024 17:20:15 +0100 Subject: [PATCH 05/33] feat(gen): test updated actions workflow --- .github/workflows/link-check-schedule.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 32edb61fdf..e7068d98cf 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -6,6 +6,7 @@ on: jobs: linkcheck: runs-on: ubuntu-latest + continue-on-error: true steps: - uses: filiph/linkcheck@3.0.0 with: From e5b34b22338f4916ea080a69b8ca75b7f7cae7ff Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Dec 2024 17:27:31 +0100 Subject: [PATCH 06/33] feat(gen): test updated actions workflow --- .github/workflows/link-check-schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index e7068d98cf..dbd7008572 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -6,12 +6,12 @@ on: jobs: linkcheck: runs-on: ubuntu-latest - continue-on-error: true steps: - uses: filiph/linkcheck@3.0.0 with: arguments: https://www.scaleway.com/en/docs/ >> linkcheck_output.txt - name: Upload a Build Artifact + if: always() uses: actions/upload-artifact@v4.4.3 with: name: linkcheck_output.txt From 0cf32286eae861c72259744602399d70384bf950 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 11 Dec 2024 17:52:49 +0100 Subject: [PATCH 07/33] feat(gen): test updated actions workflow --- .github/workflows/link-check-schedule.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index dbd7008572..335f26509b 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -11,8 +11,15 @@ jobs: with: arguments: https://www.scaleway.com/en/docs/ >> linkcheck_output.txt - name: Upload a Build Artifact - if: always() + if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: actions/upload-artifact@v4.4.3 with: name: linkcheck_output.txt path: linkcheck_output.txt + - name: Send a saved artifact to a Slack workflow + if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. + uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action + with: + payload-file-path: "linkcheck_output.txt" + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: webhook-trigger From 008bd91b64e86b516ca82fbc80d5e65df53f01de Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 10:08:26 +0100 Subject: [PATCH 08/33] feat(gen): add slack webhook --- .github/workflows/link-check-schedule.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 335f26509b..3e4733308b 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -20,6 +20,8 @@ jobs: if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action with: + payload: | + text: The link check results are available here. payload-file-path: "linkcheck_output.txt" webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: webhook-trigger From 43dfad7824718bf7f311f614aaa68e5e8dbfe039 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 10:40:16 +0100 Subject: [PATCH 09/33] feat(gen): add date --- .github/workflows/link-check-schedule.yml | 39 ++++++++++++----------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 3e4733308b..96970311b3 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -7,21 +7,24 @@ jobs: linkcheck: runs-on: ubuntu-latest steps: - - uses: filiph/linkcheck@3.0.0 - with: - arguments: https://www.scaleway.com/en/docs/ >> linkcheck_output.txt - - name: Upload a Build Artifact - if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. - uses: actions/upload-artifact@v4.4.3 - with: - name: linkcheck_output.txt - path: linkcheck_output.txt - - name: Send a saved artifact to a Slack workflow - if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. - uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action - with: - payload: | - text: The link check results are available here. - payload-file-path: "linkcheck_output.txt" - webhook: ${{ secrets.SLACK_WEBHOOK_URL }} - webhook-type: webhook-trigger + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - uses: filiph/linkcheck@3.0.0 + with: + arguments: https://www.scaleway.com/en/docs/ >> linkcheck_output.txt + - name: Upload a Build Artifact + if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. + uses: actions/upload-artifact@v4.4.3 + with: + name: linkcheck_output.txt + path: linkcheck_output.txt + - name: Send a saved artifact to a Slack workflow + if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. + uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action + with: + payload: | + text: Link check results from ${{ steps.date.outputs.date }}. + payload-file-path: "linkcheck_output.txt" + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: webhook-trigger From 727264a95f5746d25d88a8025451bbbd24a6af03 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 10:41:27 +0100 Subject: [PATCH 10/33] feat(gen): fixp indent --- .github/workflows/link-check-schedule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 96970311b3..426d046cc2 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - uses: filiph/linkcheck@3.0.0 with: arguments: https://www.scaleway.com/en/docs/ >> linkcheck_output.txt From 13b43cfb2454a8f56c84af02d3a3fd9d244da281 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 11:01:18 +0100 Subject: [PATCH 11/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 426d046cc2..58af772da4 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -9,10 +9,12 @@ jobs: steps: - name: Get current date id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + run: | + echo "name=date" >> $GITHUB_STATE + echo "name=date value=$(date +'%Y-%m-%d')" >> $GITHUB_STATE - uses: filiph/linkcheck@3.0.0 with: - arguments: https://www.scaleway.com/en/docs/ >> linkcheck_output.txt + arguments: https://www.scaleway.com/en/docs/serverless/ >> linkcheck_output.txt - name: Upload a Build Artifact if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: actions/upload-artifact@v4.4.3 From fb72da5de8ecad85494d479d1d103b6601a286b1 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 11:06:48 +0100 Subject: [PATCH 12/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 58af772da4..8d59f7fcc9 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -26,7 +26,7 @@ jobs: uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action with: payload: | - text: Link check results from ${{ steps.date.outputs.date }}. - payload-file-path: "linkcheck_output.txt" + text: "Link check results from ${{ steps.date.outputs.date }}."" + file: "linkcheck_output.txt" webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: webhook-trigger From 071e3986773eaf3d5a607c47cf0aced5e7b4c9b1 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 11:10:45 +0100 Subject: [PATCH 13/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 8d59f7fcc9..3dc5075b19 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -25,8 +25,8 @@ jobs: if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook payload: | text: "Link check results from ${{ steps.date.outputs.date }}."" file: "linkcheck_output.txt" - webhook: ${{ secrets.SLACK_WEBHOOK_URL }} - webhook-type: webhook-trigger From 8471873ab2a162aa767f12467313d91e5b8d1951 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 11:13:37 +0100 Subject: [PATCH 14/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 3dc5075b19..3bb8d3e79a 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -7,11 +7,6 @@ jobs: linkcheck: runs-on: ubuntu-latest steps: - - name: Get current date - id: date - run: | - echo "name=date" >> $GITHUB_STATE - echo "name=date value=$(date +'%Y-%m-%d')" >> $GITHUB_STATE - uses: filiph/linkcheck@3.0.0 with: arguments: https://www.scaleway.com/en/docs/serverless/ >> linkcheck_output.txt @@ -28,5 +23,4 @@ jobs: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | - text: "Link check results from ${{ steps.date.outputs.date }}."" - file: "linkcheck_output.txt" + text: "Link check results." From 95a6e4be66d39149a1d7a8c8b5d2e949c9ccb2b4 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 11:38:52 +0100 Subject: [PATCH 15/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 3bb8d3e79a..43606bb345 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -9,18 +9,27 @@ jobs: steps: - uses: filiph/linkcheck@3.0.0 with: - arguments: https://www.scaleway.com/en/docs/serverless/ >> linkcheck_output.txt + arguments: https://www.scaleway.com/en/docs/serverless/ >> $GITHUB_OUTPUT + id: run_check - name: Upload a Build Artifact if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: actions/upload-artifact@v4.4.3 with: name: linkcheck_output.txt path: linkcheck_output.txt - - name: Send a saved artifact to a Slack workflow + - name: Send message to Slack + if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. + uses: slackapi/slack-github-action@v2.0.0 + with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook + payload: | + text: "Link check results are available in :thread:." + - name: Reply with output of linkcheck if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action with: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | - text: "Link check results." + text: "${{ steps.run_check.outputs.*}}" From 251331f4ab4939e041c7ffebf09ca7b88d077cb2 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 11:45:52 +0100 Subject: [PATCH 16/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 43606bb345..0050d99a16 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -9,8 +9,7 @@ jobs: steps: - uses: filiph/linkcheck@3.0.0 with: - arguments: https://www.scaleway.com/en/docs/serverless/ >> $GITHUB_OUTPUT - id: run_check + arguments: https://www.scaleway.com/en/docs/serverless/ >> linkcheck_output.txt - name: Upload a Build Artifact if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: actions/upload-artifact@v4.4.3 @@ -25,6 +24,8 @@ jobs: webhook-type: incoming-webhook payload: | text: "Link check results are available in :thread:." + - name: Parse output to variable + run: =$( Date: Fri, 13 Dec 2024 11:46:11 +0100 Subject: [PATCH 17/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 0050d99a16..aea8d47c86 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -25,7 +25,7 @@ jobs: payload: | text: "Link check results are available in :thread:." - name: Parse output to variable - run: =$( Date: Fri, 13 Dec 2024 12:02:55 +0100 Subject: [PATCH 18/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index aea8d47c86..c886d83126 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -25,7 +25,7 @@ jobs: payload: | text: "Link check results are available in :thread:." - name: Parse output to variable - run: var=$( Date: Fri, 13 Dec 2024 12:11:03 +0100 Subject: [PATCH 19/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index c886d83126..c6be791010 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -17,6 +17,7 @@ jobs: name: linkcheck_output.txt path: linkcheck_output.txt - name: Send message to Slack + id: initial_message if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: slackapi/slack-github-action@v2.0.0 with: @@ -33,4 +34,5 @@ jobs: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | + thread_ts: "${{ steps.initial_message.outputs.ts }}" text: "$var" From 5aeccf203e03caa02e60e6c7d9350bfcd999f4f8 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 13:57:31 +0100 Subject: [PATCH 20/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index c6be791010..28a76a5eec 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -26,7 +26,9 @@ jobs: payload: | text: "Link check results are available in :thread:." - name: Parse output to variable - run: var=`$(> $GITHUB_ENV - name: Reply with output of linkcheck if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action @@ -35,4 +37,4 @@ jobs: webhook-type: incoming-webhook payload: | thread_ts: "${{ steps.initial_message.outputs.ts }}" - text: "$var" + text: "$FILE_CONTENT" From c843433ddf8dab2c65cedb697a3d4b00aa08d6f3 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:04:21 +0100 Subject: [PATCH 21/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 28a76a5eec..b95e82846d 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -10,12 +10,14 @@ jobs: - uses: filiph/linkcheck@3.0.0 with: arguments: https://www.scaleway.com/en/docs/serverless/ >> linkcheck_output.txt - - name: Upload a Build Artifact - if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. - uses: actions/upload-artifact@v4.4.3 - with: - name: linkcheck_output.txt - path: linkcheck_output.txt + - name: Parse output to variable + if: always() + run: | + FILE_CONTENT=$(cat linkcheck_output.txt) + echo "file_content=$FILE_CONTENT" >> $GITHUB_ENV + - name: check if content exists + run: | + echo "$GITHUB_ENV" - name: Send message to Slack id: initial_message if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. @@ -25,12 +27,8 @@ jobs: webhook-type: incoming-webhook payload: | text: "Link check results are available in :thread:." - - name: Parse output to variable - run: | - FILE_CONTENT=$(cat linkcheck_output.txt) - echo "file_content=$FILE_CONTENT" >> $GITHUB_ENV - name: Reply with output of linkcheck - if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. + if: always() uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action with: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} From a7ca061ee924bea8de330f50142aa5854f5d6d14 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:08:43 +0100 Subject: [PATCH 22/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index b95e82846d..2a2aafcc22 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -13,8 +13,8 @@ jobs: - name: Parse output to variable if: always() run: | - FILE_CONTENT=$(cat linkcheck_output.txt) - echo "file_content=$FILE_CONTENT" >> $GITHUB_ENV + FILE_CONTENT="$(cat linkcheck_output.txt)" + echo "$FILE_CONTENT" >> $GITHUB_ENV - name: check if content exists run: | echo "$GITHUB_ENV" From 2a74c2f2bd9dc6d13e55217a931f15e072a59629 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:15:16 +0100 Subject: [PATCH 23/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 9 +++++++-- test.txt | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 test.txt diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 2a2aafcc22..93595b1584 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -13,8 +13,13 @@ jobs: - name: Parse output to variable if: always() run: | - FILE_CONTENT="$(cat linkcheck_output.txt)" - echo "$FILE_CONTENT" >> $GITHUB_ENV + { + echo 'LINKCHECK_OUTPUT<> "$GITHUB_ENV" + # FILE_CONTENT="$(cat linkcheck_output.txt)" + # echo "$FILE_CONTENT" >> $GITHUB_ENV - name: check if content exists run: | echo "$GITHUB_ENV" diff --git a/test.txt b/test.txt new file mode 100644 index 0000000000..2c3c16c016 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +slack_sdk == 3.27.2 \ No newline at end of file From e7cbb32fc49c8036bf6a778631191cb0a53ef704 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:21:51 +0100 Subject: [PATCH 24/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 93595b1584..f929fc3c3a 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -18,14 +18,9 @@ jobs: cat linkcheck_output.txt echo EOF } >> "$GITHUB_ENV" - # FILE_CONTENT="$(cat linkcheck_output.txt)" - # echo "$FILE_CONTENT" >> $GITHUB_ENV - - name: check if content exists - run: | - echo "$GITHUB_ENV" - name: Send message to Slack id: initial_message - if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. + if: always() uses: slackapi/slack-github-action@v2.0.0 with: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} @@ -40,4 +35,4 @@ jobs: webhook-type: incoming-webhook payload: | thread_ts: "${{ steps.initial_message.outputs.ts }}" - text: "$FILE_CONTENT" + text: "$LINKCHECK_OUTPUT" From a7706c0fd8952cdc6bd1af37851281a31a6892a1 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:25:42 +0100 Subject: [PATCH 25/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index f929fc3c3a..d5b1eadbb7 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -27,6 +27,8 @@ jobs: webhook-type: incoming-webhook payload: | text: "Link check results are available in :thread:." + - name: Extract ts value + run: echo "ts=${{ steps.initial_message.outputs.ts }}" >> $GITHUB_ENV - name: Reply with output of linkcheck if: always() uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action @@ -34,5 +36,5 @@ jobs: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | - thread_ts: "${{ steps.initial_message.outputs.ts }}" + thread_ts: "${{ env.ts }}" text: "$LINKCHECK_OUTPUT" From 4b584464633d68a5d98049c21a0771315f53696a Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:27:49 +0100 Subject: [PATCH 26/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index d5b1eadbb7..e11efa48da 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -29,6 +29,8 @@ jobs: text: "Link check results are available in :thread:." - name: Extract ts value run: echo "ts=${{ steps.initial_message.outputs.ts }}" >> $GITHUB_ENV + - name: check if timestamp exists + echo "${{ env.ts }}" - name: Reply with output of linkcheck if: always() uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action From 6b282bfc729f1d669b8398b170f360c1a1c37556 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:28:46 +0100 Subject: [PATCH 27/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index e11efa48da..544be3c4b6 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -30,7 +30,8 @@ jobs: - name: Extract ts value run: echo "ts=${{ steps.initial_message.outputs.ts }}" >> $GITHUB_ENV - name: check if timestamp exists - echo "${{ env.ts }}" + run: | + echo "${{ env.ts }}" - name: Reply with output of linkcheck if: always() uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action From f6983b061983fff086b184ce1435f8f41dcabed0 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:33:23 +0100 Subject: [PATCH 28/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 544be3c4b6..c459b81c8e 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -28,10 +28,16 @@ jobs: payload: | text: "Link check results are available in :thread:." - name: Extract ts value - run: echo "ts=${{ steps.initial_message.outputs.ts }}" >> $GITHUB_ENV + # run: echo "ts=${{ steps.initial_message.outputs.ts }}" >> $GITHUB_ENV + run: | + { + echo 'TIMESTAMP<> "$GITHUB_ENV" - name: check if timestamp exists run: | - echo "${{ env.ts }}" + echo "$TIMESTAMP" - name: Reply with output of linkcheck if: always() uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action @@ -39,5 +45,5 @@ jobs: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | - thread_ts: "${{ env.ts }}" + thread_ts: "$TIMESTAMP" text: "$LINKCHECK_OUTPUT" From e41abf02a42aaaa0c65a91925a0b5f3474017d82 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:42:15 +0100 Subject: [PATCH 29/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index c459b81c8e..6f2b9d23e8 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -19,25 +19,15 @@ jobs: echo EOF } >> "$GITHUB_ENV" - name: Send message to Slack - id: initial_message if: always() uses: slackapi/slack-github-action@v2.0.0 + id: initial_message with: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | + channel: ${{ secrets.SLACK_CHANNEL_ID }} text: "Link check results are available in :thread:." - - name: Extract ts value - # run: echo "ts=${{ steps.initial_message.outputs.ts }}" >> $GITHUB_ENV - run: | - { - echo 'TIMESTAMP<> "$GITHUB_ENV" - - name: check if timestamp exists - run: | - echo "$TIMESTAMP" - name: Reply with output of linkcheck if: always() uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action @@ -45,5 +35,6 @@ jobs: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | - thread_ts: "$TIMESTAMP" + channel: ${{ secrets.SLACK_CHANNEL_ID }} + thread_ts: "{{ steps.initial_message.outputs.ts }}" text: "$LINKCHECK_OUTPUT" From 7e07d5a3363979ded0fb16776c0cb2140ec141a8 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:47:35 +0100 Subject: [PATCH 30/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 49 ++++++++++++++--------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 6f2b9d23e8..880ca5b8ea 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -18,23 +18,32 @@ jobs: cat linkcheck_output.txt echo EOF } >> "$GITHUB_ENV" - - name: Send message to Slack - if: always() - uses: slackapi/slack-github-action@v2.0.0 - id: initial_message - with: - webhook: ${{ secrets.SLACK_WEBHOOK_URL }} - webhook-type: incoming-webhook - payload: | - channel: ${{ secrets.SLACK_CHANNEL_ID }} - text: "Link check results are available in :thread:." - - name: Reply with output of linkcheck - if: always() - uses: slackapi/slack-github-action@v2.0.0 # ref: https://github.com/slackapi/slack-github-action - with: - webhook: ${{ secrets.SLACK_WEBHOOK_URL }} - webhook-type: incoming-webhook - payload: | - channel: ${{ secrets.SLACK_CHANNEL_ID }} - thread_ts: "{{ steps.initial_message.outputs.ts }}" - text: "$LINKCHECK_OUTPUT" + # - name: Send message to Slack + # if: always() + # uses: slackapi/slack-github-action@v2.0.0 + # id: initial_message + # with: + # webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + # webhook-type: incoming-webhook + # payload: | + # channel: ${{ secrets.SLACK_CHANNEL_ID }} + # text: "Link check results are available in :thread:." + - name: Send a message to Slack via Webhook + id: send_message + run: | + response=$(curl -s -X POST -H 'Content-type: application/json' \ + --data '{ + "text": "Link check results are available in :thread:." + }' ${{ secrets.SLACK_WEBHOOK_URL }}) + echo "response=$response" >> $GITHUB_ENV + - name: Save thread_ts + run: | + echo "thread_ts=" >> $GITHUB_ENV + + - name: Reply to the thread via Webhook + run: | + curl -s -X POST -H 'Content-type: application/json' \ + --data '{ + "text": "This is a reply to the thread.", + "thread_ts": "${{ env.thread_ts }}" + }' ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file From 5ff796099b2a18aa7428fdc9d103433d06d9e719 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 14:56:50 +0100 Subject: [PATCH 31/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 42 +++++++---------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 880ca5b8ea..4b711998e4 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -18,32 +18,16 @@ jobs: cat linkcheck_output.txt echo EOF } >> "$GITHUB_ENV" - # - name: Send message to Slack - # if: always() - # uses: slackapi/slack-github-action@v2.0.0 - # id: initial_message - # with: - # webhook: ${{ secrets.SLACK_WEBHOOK_URL }} - # webhook-type: incoming-webhook - # payload: | - # channel: ${{ secrets.SLACK_CHANNEL_ID }} - # text: "Link check results are available in :thread:." - - name: Send a message to Slack via Webhook - id: send_message - run: | - response=$(curl -s -X POST -H 'Content-type: application/json' \ - --data '{ - "text": "Link check results are available in :thread:." - }' ${{ secrets.SLACK_WEBHOOK_URL }}) - echo "response=$response" >> $GITHUB_ENV - - name: Save thread_ts - run: | - echo "thread_ts=" >> $GITHUB_ENV - - - name: Reply to the thread via Webhook - run: | - curl -s -X POST -H 'Content-type: application/json' \ - --data '{ - "text": "This is a reply to the thread.", - "thread_ts": "${{ env.thread_ts }}" - }' ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file + - name: Send message to Slack + if: always() + uses: slackapi/slack-github-action@v2.0.0 + id: initial_message + with: + method: files.uploadV2 + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook + payload: | + channel: ${{ secrets.SLACK_CHANNEL_ID }} + text: "Link check results are available in :thread:." + initial_comment: "the results are in!" + file: "linkcheck_output.txt" From 12a16ffa63f43579cd2bf93c4e3d750cd5434fb4 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 15:05:27 +0100 Subject: [PATCH 32/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index 4b711998e4..e23a79bccb 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -21,13 +21,8 @@ jobs: - name: Send message to Slack if: always() uses: slackapi/slack-github-action@v2.0.0 - id: initial_message with: - method: files.uploadV2 webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | - channel: ${{ secrets.SLACK_CHANNEL_ID }} - text: "Link check results are available in :thread:." - initial_comment: "the results are in!" - file: "linkcheck_output.txt" + text: "Link check results:\n $LINKCHECK_OUTPUT" From 10d7be11993cfd039a426802f1dac7759978efa2 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 13 Dec 2024 15:07:36 +0100 Subject: [PATCH 33/33] feat(gen): update --- .github/workflows/link-check-schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check-schedule.yml b/.github/workflows/link-check-schedule.yml index e23a79bccb..8b7d08af1b 100644 --- a/.github/workflows/link-check-schedule.yml +++ b/.github/workflows/link-check-schedule.yml @@ -25,4 +25,4 @@ jobs: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook payload: | - text: "Link check results:\n $LINKCHECK_OUTPUT" + text: "Link check results:\n ${{ env.LINKCHECK_OUTPUT }}"