diff --git a/Dockerfile b/Dockerfile index bb4d623..9aea43b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,14 @@ FROM alpine:3.17 MAINTAINER Serhiy Mitrovtsiy ARG TARGETPLATFORM -ARG KUBE_VERSION="v1.29.2" +ARG KUBE_VERSION="v1.31.1" COPY entrypoint.sh /entrypoint.sh RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; else ARCHITECTURE=amd64; fi && \ chmod +x /entrypoint.sh && \ apk add --no-cache --update openssl curl ca-certificates && \ - curl -L https://storage.googleapis.com/kubernetes-release/release/$KUBE_VERSION/bin/linux/$ARCHITECTURE/kubectl -o /usr/local/bin/kubectl && \ + curl -L https://dl.k8s.io/release/$KUBE_VERSION/bin/linux/$ARCHITECTURE/kubectl -o /usr/local/bin/kubectl && \ chmod +x /usr/local/bin/kubectl && \ rm -rf /var/cache/apk/* diff --git a/README.md b/README.md index f3f37a5..592614e 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: actions-hub/kubectl@master env: KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} @@ -101,7 +101,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: actions-hub/kubectl@master env: KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} @@ -125,4 +125,4 @@ To use a specific version of kubectl use: ``` ## Licence -[MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE) \ No newline at end of file +[MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE) diff --git a/entrypoint.sh b/entrypoint.sh index 79da000..93b1983 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -40,9 +40,13 @@ fi if [ -z "$dest" ]; then kubectl $* else - echo "$dest<> $GITHUB_ENV + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + echo "$dest<<$EOF" >> $GITHUB_ENV kubectl $* >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV - + if [[ "${GITHUB_ENV: -1}" != $'\n' ]]; then + echo >> $GITHUB_ENV + fi + echo "$EOF" >> $GITHUB_ENV + echo "::add-mask::$dest" fi