We need to create a temporary kubernetes cluster in github actions for running e2e tests in actions.
- setup sealos in github actions
See action.yml
SealosByRelease:
steps:
- name: Auto install sealos
uses: labring/[email protected]
with:
sealosVersion: 4.1.3
- name: Sealos version
run: sudo sealos version
- name: Login sealos
run: |
sudo sealos login -u ${{ github.repository_owner }} -p ${{ secrets.GH_TOKEN }} --debug ghcr.io
- name: Build sealos image by dockerfile
working-directory: test/build-dockerfile
run: |
sudo sealos build -t testactionimage:dockerfile -f Dockerfile .
- name: Build sealos image by kubefile
working-directory: test/build-kubefile
run: |
sudo sealos build -t testactionimage:kubefile -f Kubefile .
- name: Run images
run: |
sudo sealos images
- name: Auto install k8s using sealos
run: |
sudo sealos run labring/kubernetes:v1.24.0 --single
SealosByMainCode:
steps:
- name: Auto install sealos
uses: labring/[email protected]
with:
type: install-dev
sealosGit: https://github.com/cuisongliu/sealos.git
sealosGitBranch: main
goAddr: https://go.dev/dl/go1.20.linux-amd64.tar.gz
pruneCRI: true
- name: Sealos version
run: sudo sealos version
- name: Login sealos
run: |
sudo sealos login -u ${{ github.repository_owner }} -p ${{ secrets.GH_TOKEN }} --debug ghcr.io
- name: Build sealos image by dockerfile
working-directory: test/build-dockerfile
run: |
sudo sealos build -t testactionimage:dockerfile -f Dockerfile .
- name: Build sealos image by kubefile
working-directory: test/build-kubefile
run: |
sudo sealos build -t testactionimage:kubefile -f Kubefile .
- name: Run images
run: |
sudo sealos images
- name: Auto install k8s using sealos
run: |
sudo sealos run labring/kubernetes:v1.24.0 --single
Name | Description | Default |
---|---|---|
type |
sealos action type, 'install/install-dev/prune' | install |
sealosVersion |
sealos version | 4.1.3 |
working-directory |
working directory for build image | `` |
sealosGit |
sealos git addr, using type=install-dev | https://github.com/labring/sealos.git |
sealosGitBranch |
sealos git branch, using type=install-dev | main |
pruneCRI |
pruneCRI pkg ex: docker,runc,containerd | true |
autoFetch |
auto fetch git code | true |
goAddr |
go tar download addr, using type=install-dev | https://go.dev/dl/go1.20.linux-amd64.tar.gz |
sealos: Supports cluster image
, it is very convenient to install helm, ingress, cert-manager, @see https://sealos.io
- support sealos run k8s and app in action
- support install buildah param
- support working-directory
- support sealctl
- support debug mode
- support install/build/run-k8s/run-app/login/push/version/images
- support main sealos build
- delete build/run-k8s/run-app/login/push/version/images
- support install-dev
- support git branch
- support prune cri pkg
- support autoFetch
- support arm64
- add prune