Skip to content

docs(main): fix bot config (#2976) #2

docs(main): fix bot config (#2976)

docs(main): fix bot config (#2976) #2

Workflow file for this run

name: Test Sealos Inspect Command
on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- ".github/workflows/test_inspect.yml"
- "cmd/**"
- "pkg/**"
pull_request:
branches: ["*"]
paths:
- ".github/workflows/test_inspect.yml"
- "cmd/**"
- "pkg/**"
jobs:
build-sealos:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Auto install sealos
uses: labring/[email protected]
with:
type: install-dev
pruneCRI: true
autoFetch: false
- name: Save Binaries
uses: actions/upload-artifact@v3
with:
name: sealos
path: /usr/bin/sealos
verify-install:
needs: [build-sealos]
runs-on: ubuntu-latest
steps:
- name: Download sealos
uses: actions/download-artifact@v3
with:
name: sealos
path: /tmp/
- name: Verify sealos
run: |
sudo chmod a+x /tmp/sealos
sudo mv /tmp/sealos /usr/bin/
sudo sealos version
- name: Remove containerd && docker
uses: labring/[email protected]
with:
type: prune
- name: Auto install k8s using sealos
run: |
sudo sealos run labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.1 --single --debug
mkdir -p "$HOME/.kube"
sudo cp -i /etc/kubernetes/admin.conf "$HOME/.kube/config"
sudo chown "$(whoami)" "$HOME/.kube/config"
kubectl get nodes --no-headers -oname | while read -r node; do kubectl get "$node" -o template='{{range .spec.taints}}{{.key}}{{"\n"}}{{end}}' | while read -r taint; do
kubectl taint ${node/\// } "$taint"-
done; done
kubectl get svc
sudo cat /root/.sealos/default/etc/kubeadm-init.yaml
verify-inspect:
needs: [build-sealos]
runs-on: ubuntu-latest
steps:
- name: Download sealos
uses: actions/download-artifact@v3
with:
name: sealos
path: /tmp/
- name: Verify sealos
run: |
sudo chmod a+x /tmp/sealos
sudo mv /tmp/sealos /usr/bin/
sudo sealos version
- name: Inspect
run: |
sudo sealos pull labring/kubernetes:v1.23.8
echo "test inspect local image labring/kubernetes:v1.23.8"
sudo sealos inspect labring/kubernetes:v1.23.8
echo "test inspect remote image labring/kubernetes:v1.23.8"
sudo sealos inspect docker://labring/kubernetes:v1.24.0
echo "save alpine using docker and oci"
sudo buildah pull alpine:3
sudo buildah push alpine:3 docker-archive:$PWD/docker-alpine.tar
sudo buildah push alpine:3 oci-archive:$PWD/oci-alpine.tar
echo "test inspect oci archive alpine.tar"
sudo sealos inspect oci-archive:$PWD/oci-alpine.tar
echo "test inspect docker archive alpine.tar"
sudo sealos inspect docker-archive:$PWD/docker-alpine.tar
imageID=`sudo sealos images | grep labring/kubernetes | grep v1.23.8 | awk '{print $3}'`
echo "test inspect id ${imageID}"
sudo sealos inspect ${imageID}
verify-gen:
needs: [build-sealos]
runs-on: ubuntu-latest
steps:
- name: Download sealos
uses: actions/download-artifact@v3
with:
name: sealos
path: /tmp/
- name: Verify sealos
run: |
sudo chmod a+x /tmp/sealos
sudo mv /tmp/sealos /usr/bin/
sudo sealos version
- name: Inspect
run: |
sudo sealos gen labring/kubernetes:v1.23.8 --masters 127.0.0.1