From 43380cde982412114254b0be448265c4f6d20eb6 Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 16:08:56 +0200 Subject: [PATCH 1/7] ci: updates install step to use new asset naming scheme --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 8cdcb75..0805763 100644 --- a/action.yml +++ b/action.yml @@ -47,10 +47,10 @@ runs: - name: Install lychee run: | # Cleanup artifacts from previous run in case it crashed - rm -rf "lychee-${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz" lychee - curl -sLO "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz" - tar -xvzf "lychee-${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz" - rm "lychee-${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz" + rm -rf lychee-x86_64-unknown-linux-gnu.tar.gz lychee + curl -sLO "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz" + tar -xvzf lychee-x86_64-unknown-linux-gnu.tar.gz + rm lychee-x86_64-unknown-linux-gnu.tar.gz install -t "$HOME/.local/bin" -D lychee rm lychee echo "$HOME/.local/bin" >> "$GITHUB_PATH" From f78899a9b9d40347e5db76deb0c91a83b0247b96 Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 16:16:09 +0200 Subject: [PATCH 2/7] ci: simplifies install step by using pipes instead of storing downloads on disk --- action.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 0805763..901626c 100644 --- a/action.yml +++ b/action.yml @@ -47,10 +47,8 @@ runs: - name: Install lychee run: | # Cleanup artifacts from previous run in case it crashed - rm -rf lychee-x86_64-unknown-linux-gnu.tar.gz lychee - curl -sLO "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz" - tar -xvzf lychee-x86_64-unknown-linux-gnu.tar.gz - rm lychee-x86_64-unknown-linux-gnu.tar.gz + rm -f lychee + curl -sL "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz" | tar xvz - install -t "$HOME/.local/bin" -D lychee rm lychee echo "$HOME/.local/bin" >> "$GITHUB_PATH" From 2c62c603787040fed91b3888396204396c2c3330 Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 16:22:00 +0200 Subject: [PATCH 3/7] ci: adds comment to keep files dependent files in sync --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 901626c..6e5067b 100644 --- a/action.yml +++ b/action.yml @@ -1,3 +1,6 @@ +# note: keep asset names in sync with: +# https://github.com/lycheeverse/lychee/blob/master/.github/workflows/release.yml + name: "Lychee Broken Link Checker" description: "Quickly check links in Markdown, HTML, and text files" inputs: From 9d783bee076bb6a826e1e70e9de0143bafa7e8de Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 17:49:47 +0200 Subject: [PATCH 4/7] ci: make cleanup more robust and future-proof --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 6e5067b..223a0db 100644 --- a/action.yml +++ b/action.yml @@ -50,7 +50,7 @@ runs: - name: Install lychee run: | # Cleanup artifacts from previous run in case it crashed - rm -f lychee + rm -rf lychee* || echo "No leftovers to clean up. Skipping." curl -sL "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz" | tar xvz - install -t "$HOME/.local/bin" -D lychee rm lychee From 0166015fb3ca0ed031d8ea8cf4ea550cdaabdf4f Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 17:51:44 +0200 Subject: [PATCH 5/7] ci: fix download of artifact command to be compatible with most linux distributions (including ubuntu) --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 223a0db..f4bf0d3 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ runs: run: | # Cleanup artifacts from previous run in case it crashed rm -rf lychee* || echo "No leftovers to clean up. Skipping." - curl -sL "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz" | tar xvz - + curl -sL "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz" | tar -xvzf - install -t "$HOME/.local/bin" -D lychee rm lychee echo "$HOME/.local/bin" >> "$GITHUB_PATH" From ce233758ea3b90a31b814fba3cad374623b15a61 Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 18:01:41 +0200 Subject: [PATCH 6/7] ci: adds force flag for robustness Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index f4bf0d3..799f244 100644 --- a/action.yml +++ b/action.yml @@ -53,7 +53,7 @@ runs: rm -rf lychee* || echo "No leftovers to clean up. Skipping." curl -sL "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz" | tar -xvzf - install -t "$HOME/.local/bin" -D lychee - rm lychee +rm -f lychee echo "$HOME/.local/bin" >> "$GITHUB_PATH" shell: bash - name: Run lychee From f34928a39c9f1a6f7639f49344e974de799eb244 Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 21:30:26 +0200 Subject: [PATCH 7/7] ci: fix indentation and add wildcard to be future-proof --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 799f244..99246e2 100644 --- a/action.yml +++ b/action.yml @@ -53,7 +53,7 @@ runs: rm -rf lychee* || echo "No leftovers to clean up. Skipping." curl -sL "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz" | tar -xvzf - install -t "$HOME/.local/bin" -D lychee -rm -f lychee + rm -f lychee* echo "$HOME/.local/bin" >> "$GITHUB_PATH" shell: bash - name: Run lychee