Merge branch 'master' into master

This commit is contained in:
Serhiy Mytrovtsiy 2024-09-23 11:34:43 +02:00 committed by GitHub
commit f014f000b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 8 deletions

View File

@ -2,14 +2,14 @@ FROM alpine:3.17
MAINTAINER Serhiy Mitrovtsiy <mitrovtsiy@ukr.net> MAINTAINER Serhiy Mitrovtsiy <mitrovtsiy@ukr.net>
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG KUBE_VERSION="v1.29.2" ARG KUBE_VERSION="v1.31.1"
COPY entrypoint.sh /entrypoint.sh 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 && \ 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 && \ chmod +x /entrypoint.sh && \
apk add --no-cache --update openssl curl ca-certificates && \ 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 && \ chmod +x /usr/local/bin/kubectl && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*

View File

@ -83,7 +83,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v4
- uses: actions-hub/kubectl@master - uses: actions-hub/kubectl@master
env: env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
@ -101,7 +101,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v4
- uses: actions-hub/kubectl@master - uses: actions-hub/kubectl@master
env: env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
@ -125,4 +125,4 @@ To use a specific version of kubectl use:
``` ```
## Licence ## Licence
[MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE) [MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE)

View File

@ -40,9 +40,13 @@ fi
if [ -z "$dest" ]; then if [ -z "$dest" ]; then
kubectl $* kubectl $*
else else
echo "$dest<<EOF" >> $GITHUB_ENV EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "$dest<<$EOF" >> $GITHUB_ENV
kubectl $* >> $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" echo "::add-mask::$dest"
fi fi