Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
exelban authored Sep 23, 2024
2 parents e6afa5f + ed2c67d commit f014f00
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ FROM alpine:3.17
MAINTAINER Serhiy Mitrovtsiy <[email protected]>

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/*

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -125,4 +125,4 @@ To use a specific version of kubectl use:
```

## Licence
[MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE)
[MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE)
10 changes: 7 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ fi
if [ -z "$dest" ]; then
kubectl $*
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
echo "EOF" >> $GITHUB_ENV

if [[ "${GITHUB_ENV: -1}" != $'\n' ]]; then
echo >> $GITHUB_ENV
fi
echo "$EOF" >> $GITHUB_ENV

echo "::add-mask::$dest"
fi

0 comments on commit f014f00

Please sign in to comment.