fix: 流水线kubeconfig改用临时目录
This commit is contained in:
@@ -19,6 +19,8 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
KUBECONFIG: /tmp/kubeconfig
|
||||||
steps:
|
steps:
|
||||||
- name: Validate branch ↔ environment
|
- name: Validate branch ↔ environment
|
||||||
run: |
|
run: |
|
||||||
@@ -87,8 +89,8 @@ jobs:
|
|||||||
curl -sLO "https://dl.k8s.io/release/v1.30.0/bin/linux/amd64/kubectl"
|
curl -sLO "https://dl.k8s.io/release/v1.30.0/bin/linux/amd64/kubectl"
|
||||||
chmod +x kubectl
|
chmod +x kubectl
|
||||||
mv kubectl /usr/local/bin/
|
mv kubectl /usr/local/bin/
|
||||||
mkdir -p ~/.kube
|
echo "${{ secrets.KUBECONFIG_B64 }}" | base64 -d > /tmp/kubeconfig
|
||||||
echo "${{ secrets.KUBECONFIG_B64 }}" | base64 -d > ~/.kube/config
|
chmod 600 /tmp/kubeconfig
|
||||||
|
|
||||||
- name: Create/Update imagePullSecret
|
- name: Create/Update imagePullSecret
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user