From 04c9ee75d3e85c30819ff2c715ccc71fb2261262 Mon Sep 17 00:00:00 2001 From: JJGadgets Date: Mon, 4 Mar 2024 07:21:51 +0800 Subject: [PATCH] fix(vyos-build): fix rclone file names --- .github/workflows/vyos-build.yaml | 5 +++-- vyos/build.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/vyos-build.yaml b/.github/workflows/vyos-build.yaml index 368bd78a..7b3631d7 100644 --- a/.github/workflows/vyos-build.yaml +++ b/.github/workflows/vyos-build.yaml @@ -104,12 +104,13 @@ jobs: RCLONE_FAST_LIST: "true" RCLONE_UPDATE: "true" RCLONE_USE_SERVER_MODTIME: "true" - run: | # first copies ISO as is, then copies ISO with common "latest" filename (with some filters to avoid hardcoding and safeguard against uploading the wrong thing if somehow >1 file), then deletes files older than the past 5 number of files under that arch and builder name + run: + | # first copies ISO as is, then copies ISO with common "latest" filename (with some filters to avoid hardcoding and safeguard against uploading the wrong thing if somehow >1 file), then deletes files older than the past 5 number of files under that arch and builder name export FILE=$(find . -type f | tail -n 1) echo "File to upload:" echo "${FILE}" rclone copy ./ r2:vyos-build/ - rclone copyto --s3-no-list-bucket "${FILE}" r2:vyos-build/${{ env.VYOS_ARCH }}.iso + rclone copyto "${FILE}" r2:vyos-build/${{ env.VYOS_ARCH }}.iso --s3-no-check-bucket rclone lsf --format=p r2:vyos-build | grep "${{ env.VYOS_BUILDER }}" | grep "${{ env.VYOS_ARCH }}" | tail -n +3 | rclone delete --files-from - r2:vyos-build rclone cleanup r2:vyos-build # --s3-no-list-bucket needed for single file copyto bucket root, https://github.com/rclone/rclone/issues/5271 https://forum.rclone.org/t/issue-using-copyto-for-single-files/38842 diff --git a/vyos/build.sh b/vyos/build.sh index 309666f9..09151f40 100755 --- a/vyos/build.sh +++ b/vyos/build.sh @@ -43,7 +43,7 @@ curl -vLO "https://github.com/getsops/sops/releases/download/v${SOPS_VERSION}/so curl -vL -o ./vyaml_${VYAML_VERSION}_${VYOS_ARCH}.deb "https://github.com/p3lim/vyaml/releases/download/${VYAML_VERSION}/vyaml-${VYOS_ARCH}.deb" curl -vLO "https://github.com/atuinsh/atuin/releases/download/v${ATUIN_VERSION}/atuin_${ATUIN_VERSION}_${VYOS_ARCH}.deb" curl -vLO "https://github.com/go-task/task/releases/download/v${TASK_VERSION}/task_linux_${VYOS_ARCH}.deb" -curl -vO "https://pkgs.tailscale.com/stable/debian/pool/tailscale_${TAILSCALE_VERSION}_${VYOS_ARCH}.deb" +# curl -vO "https://pkgs.tailscale.com/stable/debian/pool/tailscale_${TAILSCALE_VERSION}_${VYOS_ARCH}.deb" curl -vO "https://pkg.duosecurity.com/Debian/dists/bullseye/main/binary-${VYOS_ARCH}/duo-unix_${DUO_VERSION}-0_amd64.deb" # TODO: better solution to this than assuming the -0 version suffix curl -vO "https://downloads.1password.com/linux/debian/${VYOS_ARCH}/stable/1password-cli-${VYOS_ARCH}-latest.deb" OP_VERSION=$(dpkg-deb --field ./1password-cli-${VYOS_ARCH}-latest.deb version)