File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "com.github.actions.description"="Check broken links on web pages stored l
99LABEL "com.github.actions.icon" ="list"
1010LABEL "com.github.actions.color" ="blue"
1111
12- ENV MUFFET_VERSION="2.2.1 "
12+ ENV MUFFET_VERSION="2.3.0 "
1313# ENV MUFFET_VERSION="latest"
1414
1515ENV CADDY_VERSION="2.2.1"
Original file line number Diff line number Diff line change 22
33set -Eeuo pipefail
44
5- export MUFFET_VERSION=" 2.2.1 "
5+ export MUFFET_VERSION=" 2.3.0 "
66export CADDY_VERSION=" 2.2.1"
77
88# Command line parameters for muffet
@@ -44,7 +44,7 @@ print_info() {
4444cleanup () {
4545 if [ -n " ${PAGES_PATH} " ]; then
4646 # Manipulation with /etc/hosts using 'sed -i' doesn't work inside containers
47- if ! grep -q - E ' (docker|containerd)' /proc/self/cgroup ; then
47+ if ! grep -E ' (docker|containerd)' /proc/self/cgroup & > /dev/null ; then
4848 $sudo_cmd sed -i " /127.0.0.1 ${PAGES_DOMAIN} # Created by my-broken-link-checker/d" /etc/hosts
4949 fi
5050 $sudo_cmd caddy stop & > /dev/null
8282# Install caddy if needed
8383if ! hash caddy & > /dev/null && [ -n " ${PAGES_PATH} " ] ; then
8484
85+ PLATFORM=$( uname | tr ' [:upper:]' ' [:lower:]' )
8586 if [ " ${CADDY_VERSION} " = " latest" ]; then
86- CADDY_URL=$( wget --quiet https://api.github.com/repos/caddyserver/caddy/releases/latest -O - | grep " browser_download_url.*caddy_.*_linux_amd64 .tar.gz" | cut -d \" -f 4)
87+ CADDY_URL=$( wget --quiet https://api.github.com/repos/caddyserver/caddy/releases/latest -O - | grep " browser_download_url.*caddy_.*_ ${PLATFORM} _amd64 .tar.gz" | cut -d \" -f 4)
8788 else
88- CADDY_URL=" https://github.com/caddyserver/caddy/releases/download/v${CADDY_VERSION} /caddy_${CADDY_VERSION} _linux_amd64 .tar.gz"
89+ CADDY_URL=" https://github.com/caddyserver/caddy/releases/download/v${CADDY_VERSION} /caddy_${CADDY_VERSION} _ ${PLATFORM} _amd64 .tar.gz"
8990 fi
9091
9192 wget --quiet " ${CADDY_URL} " -O - | $sudo_cmd tar xzf - -C /usr/local/bin/ caddy
You can’t perform that action at this time.
0 commit comments