Skip to content

Commit

Permalink
feat: use pre-downloaded kubectl file
Browse files Browse the repository at this point in the history
  • Loading branch information
erguotou520 committed Feb 28, 2024
1 parent 2dce736 commit e1e4d43
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM alpine:3.19
LABEL MAINTAINER="erguotou <[email protected]>"

ARG KUBE_VERSION="v1.29.2"
# ARG KUBE_VERSION="v1.29.2"

COPY entrypoint.sh /entrypoint.sh

COPY kubectl /usr/local/bin/kubectl
RUN chmod +x /entrypoint.sh && \
apk add --no-cache --update openssl curl ca-certificates && \
curl -L https://storage.googleapis.fireboom.io/kubernetes-release/release/$KUBE_VERSION/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \
# curl -L https://storage.googleapis.com/kubernetes-release/release/$KUBE_VERSION/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \
chmod +x /usr/local/bin/kubectl && \
rm -rf /var/cache/apk/*

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To use kubectl put this step into your workflow:

### Authorization with config file
```yaml
- uses: fireboomio/kubectl-action@master
- uses: fireboomio/kubectl-action@v1
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
Expand All @@ -18,7 +18,7 @@ To use kubectl put this step into your workflow:
### Authorization with credentials
```yaml
- uses: fireboomio/kubectl-action@master
- uses: fireboomio/kubectl-action@v1
env:
KUBE_HOST: ${{ secrets.KUBE_HOST }}
KUBE_CERTIFICATE: ${{ secrets.KUBE_CERTIFICATE }}
Expand All @@ -30,7 +30,7 @@ To use kubectl put this step into your workflow:
### Authorization with a bearer token
```yaml
- uses: fireboomio/kubectl-action@master
- uses: fireboomio/kubectl-action@v1
env:
KUBE_HOST: ${{ secrets.KUBE_HOST }}
KUBE_CERTIFICATE: ${{ secrets.KUBE_CERTIFICATE }}
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: fireboomio/kubectl-action@master
- uses: fireboomio/kubectl-action@v1
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
Expand All @@ -102,11 +102,11 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: fireboomio/kubectl-action@master
- uses: fireboomio/kubectl-action@v1
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
- uses: fireboomio/kubectl-action@master
- uses: fireboomio/kubectl-action@v1
with:
args: get pods
```
Expand Down
1 change: 1 addition & 0 deletions download-kubectl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
curl -o kubectl https://storage.googleapis.com/kubernetes-release/release/v1.29.2/bin/linux/amd64/kubectl
Binary file added kubectl
Binary file not shown.

0 comments on commit e1e4d43

Please sign in to comment.