|
|
@ -8,19 +8,24 @@ inputs:
|
|
|
|
version:
|
|
|
|
version:
|
|
|
|
description: "Flux version e.g. 0.8.0 (defaults to latest stable release)"
|
|
|
|
description: "Flux version e.g. 0.8.0 (defaults to latest stable release)"
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
|
|
|
|
arch:
|
|
|
|
|
|
|
|
description: "arch can be amd64, arm64 or arm"
|
|
|
|
|
|
|
|
required: true
|
|
|
|
|
|
|
|
default: "amd64"
|
|
|
|
runs:
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- name: "Download flux binary to tmp"
|
|
|
|
- name: "Download flux binary to tmp"
|
|
|
|
shell: bash
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
|
|
|
|
ARCH=${{ inputs.arch }}
|
|
|
|
VERSION=${{ inputs.version }}
|
|
|
|
VERSION=${{ inputs.version }}
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z $VERSION ]; then
|
|
|
|
if [ -z $VERSION ]; then
|
|
|
|
VERSION=$(curl https://api.github.com/repos/fluxcd/flux2/releases/latest -sL | grep tag_name | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
|
|
|
|
VERSION=$(curl https://api.github.com/repos/fluxcd/flux2/releases/latest -sL | grep tag_name | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
BIN_URL="https://github.com/fluxcd/flux2/releases/download/v${VERSION}/flux_${VERSION}_linux_amd64.tar.gz"
|
|
|
|
BIN_URL="https://github.com/fluxcd/flux2/releases/download/v${VERSION}/flux_${VERSION}_linux_${ARCH}.tar.gz"
|
|
|
|
curl -sL ${BIN_URL} -o /tmp/flux.tar.gz
|
|
|
|
curl -sL ${BIN_URL} -o /tmp/flux.tar.gz
|
|
|
|
mkdir -p /tmp/flux
|
|
|
|
mkdir -p /tmp/flux
|
|
|
|
tar -C /tmp/flux/ -zxvf /tmp/flux.tar.gz
|
|
|
|
tar -C /tmp/flux/ -zxvf /tmp/flux.tar.gz
|
|
|
|