Skip to content

Bump actions/checkout from 4.1.4 to 4.1.6 #655

Bump actions/checkout from 4.1.4 to 4.1.6

Bump actions/checkout from 4.1.4 to 4.1.6 #655

name: Test setup-kubectl
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
check-dist:
name: Check dist
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4.1.6
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
node-version: '20'
- name: Setup pnpm
run: npm install --location=global pnpm
- name: Install dependencies
run: pnpm install
- name: Check diff is up to date
run: |
pnpm build
git diff --quiet -- dist || {
echo "::error::The ./dist is outdated, run 'pnpm build' and commit"
exit 1
}
test:
name: Use setup-kubectl
strategy:
fail-fast: true
matrix:
# os: [ubuntu-22.04, macos-12, windows-2022]
os: [ubuntu-22.04, macos-12]
version: [v1.26.11, v1.27.8, v1.28.4, v1.29.0, stable, latest]
enablePlugins: [true, false]
runs-on: ${{ matrix.os }}
needs: [check-dist]
permissions:
contents: read
env:
AWS_CSM_ENABLED: 'true'
steps:
- name: Check out code
uses: actions/checkout@v4.1.6
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
node-version: '20'
- name: Setup kubectl
id: setup-kubectl
uses: ./
with:
kubectlVersion: ${{ matrix.version }}
enablePlugins: ${{ matrix.enablePlugins }}
plugins: aws-auth grep
- name: Check output and installPath
run: |
hash kubectl 2>/dev/null || { echo >&2 "kubectl can not be found in the PATH."; exit 1; }
echo "::notice::Installed kubectl ${KUBECTL_VERSION} at $(which kubectl)"
${{ matrix.enablePlugins }} && {
hash kubectl-krew 2>/dev/null || { echo >&2 "kubectl-krew can not be found in the PATH."; exit 1; }
echo "::notice::Installed krew ${KREW_VERSION} at $(which kubectl-krew)"
ls -ahl /$HOME/.krew/bin
echo "::notice::Installed following plugins $KREW_PLUGINS"
hash kubectl-aws_auth 2>/dev/null || { echo >&2 "aws-auth plugin can not be found in PATH."; exit 1; }
hash kubectl-grep 2>/dev/null || { echo >&2 "grep plugin can not be found in PATH."; exit 1; }
} || true
env:
KUBECTL_VERSION: ${{ steps.setup-kubectl.outputs.kubectl-version }}
KREW_VERSION: ${{ steps.setup-kubectl.outputs.krew-version }}
KREW_PLUGINS: ${{ steps.setup-kubectl.outputs.krew-plugins }}