Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the curl retry to support ubuntu 20.04 + add ubuntu 20.04 in matrix #19

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/test-local-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
fail-fast: false
matrix:
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
runs-on: ubuntu-latest
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest ]
runs-on: ${{ matrix.os }}
env:
BATS_LIB_PATH: "/usr/lib"
TERM: xterm
Expand Down Expand Up @@ -59,7 +60,8 @@ jobs:
fail-fast: false
matrix:
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
runs-on: ubuntu-latest
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest ]
runs-on: ${{ matrix.os }}
env:
BATS_LIB_PATH: "/usr/lib"
TERM: xterm
Expand Down
12 changes: 6 additions & 6 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ runs:

# From https://github.com/fluxcd/flux2/blob/44d69d6fc0c353e79c1bad021a4aca135033bce8/action/action.yml#L35
if [[ -z "$VERSION" ]] || [[ "$VERSION" = "latest" ]]; then
VERSION=$(curl -fsSL --retry 2 --retry-all-errors https://api.github.com/repos/bats-core/bats-core/releases/latest | grep tag_name | cut -d '"' -f 4)
VERSION=$(curl -fsSL --retry 4 --retry-connrefused https://api.github.com/repos/bats-core/bats-core/releases/latest | grep tag_name | cut -d '"' -f 4)
fi
[[ $VERSION = v* ]] && VERSION="${VERSION:1}"

mkdir -p ${TEMPDIR}
mkdir -p ${DESTDIR}

curl -sL --retry 2 --retry-all-errors ${URL}/archive/refs/tags/v${VERSION}.tar.gz | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
curl -sL --retry 4 --retry-connrefused ${URL}/archive/refs/tags/v${VERSION}.tar.gz | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}

# Install
./install.sh ${DESTDIR}
Expand Down Expand Up @@ -170,7 +170,7 @@ runs:
mkdir -p ${TEMPDIR}
[[ "${DESTDIR}" == "$HOME"* ]] && CMD="" || CMD="sudo"
${CMD} mkdir -p ${DESTDIR}/src/
curl -sL --retry 2 --retry-all-errors ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
curl -sL --retry 4 --retry-connrefused ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
# Archlinux style, except that we are not in a fakeroot env
${CMD} install -Dm755 load.bash ${DESTDIR}/load.bash
for fn in src/*.bash; do
Expand Down Expand Up @@ -203,7 +203,7 @@ runs:
mkdir -p ${TEMPDIR}
[[ "${DESTDIR}" == "$HOME"* ]] && CMD="" || CMD="sudo"
${CMD} mkdir -p ${DESTDIR}/src/
curl -sL --retry 2 --retry-all-errors ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
curl -sL --retry 4 --retry-connrefused ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
# Archlinux style, except that we are not in a fakeroot env
${CMD} install -Dm755 load.bash ${DESTDIR}/load.bash
for fn in src/*.bash; do
Expand Down Expand Up @@ -236,7 +236,7 @@ runs:
mkdir -p ${TEMPDIR}
[[ "${DESTDIR}" == "$HOME"* ]] && CMD="" || CMD="sudo"
${CMD} mkdir -p ${DESTDIR}/src/
curl -sL --retry 2 --retry-all-errors ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
curl -sL --retry 4 --retry-connrefused ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
# Archlinux style, except that we are not in a fakeroot env so we need to use sudo
for fn in lib/*.bash; do
${CMD} install -Dm755 $fn \
Expand Down Expand Up @@ -268,7 +268,7 @@ runs:
mkdir -p ${TEMPDIR}
[[ "${DESTDIR}" == "$HOME"* ]] && CMD="" || CMD="sudo"
${CMD} mkdir -p ${DESTDIR}/src/
curl -sL --retry 2 --retry-all-errors ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
curl -sL --retry 4 --retry-connrefused ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR}
# Archlinux style, except that we are not in a fakeroot env
${CMD} install -Dm755 load.bash ${DESTDIR}/load.bash
for fn in src/*.bash; do
Expand Down
Loading