Co-existing Actions
This change updates the previous implementation so that it can co-exist with the other actions in this repository. Signed-off-by: Ben Hale <bhale@vmware.com>
This commit is contained in:
parent
36ca1de577
commit
45fb191928
13
action.yml
13
action.yml
|
|
@ -1,13 +0,0 @@
|
|||
name: 'Setup Pack CLI'
|
||||
description: 'Setup a Pack CLI and add it to the PATH'
|
||||
author: 'Buildpacks.io'
|
||||
inputs:
|
||||
version:
|
||||
description: 'The Pack version to download and use.'
|
||||
required: true
|
||||
default: '0.14.1'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: ${{ github.action_path }}/dist/pack.sh "${{ inputs.version }}"
|
||||
shell: bash
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
pack_version="${1}"
|
||||
jq_version="1.6"
|
||||
crane_version="0.1.4"
|
||||
yj_version="5.0.0"
|
||||
|
||||
mkdir -p "$HOME/bin"
|
||||
|
||||
echo "---> Installing jq ${jq_version}"
|
||||
curl \
|
||||
--retry 3 \
|
||||
--output "${HOME}/bin/jq" \
|
||||
--location \
|
||||
--show-error \
|
||||
--silent \
|
||||
"https://github.com/stedolan/jq/releases/download/jq-${jq_version}/jq-linux64"
|
||||
chmod +x "${HOME}/bin/jq"
|
||||
|
||||
echo "---> Installing crane ${crane_version}"
|
||||
curl \
|
||||
--retry 3 \
|
||||
--location \
|
||||
--show-error \
|
||||
--silent \
|
||||
"https://github.com/google/go-containerregistry/releases/download/v${crane_version}/go-containerregistry_Linux_x86_64.tar.gz" \
|
||||
| tar -C "${HOME}/bin/" -xzv crane
|
||||
|
||||
echo "---> Installing yj ${yj_version}"
|
||||
curl \
|
||||
--retry 3 \
|
||||
--output "${HOME}/bin/yj" \
|
||||
--location \
|
||||
--show-error \
|
||||
--silent \
|
||||
"https://github.com/sclevine/yj/releases/download/v${yj_version}/yj-linux"
|
||||
chmod +x "${HOME}/bin/yj"
|
||||
|
||||
echo "---> Installing pack ${pack_version}"
|
||||
curl \
|
||||
--retry 3 \
|
||||
--location \
|
||||
--show-error \
|
||||
--silent \
|
||||
"https://github.com/buildpacks/pack/releases/download/v${pack_version}/pack-v${pack_version}-linux.tgz" \
|
||||
| tar -C "${HOME}/bin/" -xzv pack
|
||||
|
||||
echo "PATH=${HOME}/bin:${PATH}" >> $GITHUB_ENV
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
name: 'Setup pack CLI'
|
||||
description: 'Setup the Cloud Native Buildpacks pack CLI as well as other useful tools and add them to $PATH'
|
||||
author: 'Cloud Native Buildpacks'
|
||||
|
||||
inputs:
|
||||
crane-version:
|
||||
description: 'The version of crane to install'
|
||||
required: false
|
||||
default: '0.1.4'
|
||||
jq-version:
|
||||
description: 'The version of jq to install'
|
||||
required: false
|
||||
default: '1.6'
|
||||
pack-version:
|
||||
description: 'The version of pack to install'
|
||||
required: false
|
||||
default: '0.14.2'
|
||||
yj-version:
|
||||
description: 'The version of yj to install'
|
||||
required: false
|
||||
default: '5.0.0'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup pack CLI
|
||||
shell: bash
|
||||
run: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
mkdir -p "${HOME}"/bin
|
||||
echo "PATH=${HOME}/bin:${PATH}" >> "${GITHUB_ENV}"
|
||||
|
||||
CRANE_VERSION=${{ inputs.crane-version }}
|
||||
echo "Installing crane ${CRANE_VERSION}"
|
||||
curl \
|
||||
--show-error \
|
||||
--silent \
|
||||
--location \
|
||||
"https://github.com/google/go-containerregistry/releases/download/v${CRANE_VERSION}/go-containerregistry_Linux_x86_64.tar.gz" \
|
||||
| tar -C "${HOME}/bin" -xz crane
|
||||
|
||||
JQ_VERSION=${{ inputs.jq-version }}
|
||||
echo "Installing jq ${JQ_VERSION}"
|
||||
curl \
|
||||
--show-error \
|
||||
--silent \
|
||||
--location \
|
||||
--output "${HOME}/bin/jq" \
|
||||
"https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64"
|
||||
chmod +x "${HOME}"/bin/jq
|
||||
|
||||
PACK_VERSION=${{ inputs.pack-version }}
|
||||
echo "Installing pack ${PACK_VERSION}"
|
||||
curl \
|
||||
--show-error \
|
||||
--silent \
|
||||
--location \
|
||||
"https://github.com/buildpacks/pack/releases/download/v${PACK_VERSION}/pack-v${PACK_VERSION}-linux.tgz" \
|
||||
| tar -C "${HOME}/bin" -xz pack
|
||||
|
||||
YJ_VERSION=${{ inputs.yj-version }}
|
||||
echo "Installing yj ${YJ_VERSION}"
|
||||
curl \
|
||||
--show-error \
|
||||
--silent \
|
||||
--location \
|
||||
--output "${HOME}/bin/yj" \
|
||||
"https://github.com/sclevine/yj/releases/download/v${YJ_VERSION}/yj-linux"
|
||||
chmod +x "${HOME}"/bin/yj
|
||||
Loading…
Reference in New Issue