Skip to content

update OWNERS (#686) #325

update OWNERS (#686)

update OWNERS (#686) #325

# 1.generate kcctl docs
# 2.build image and push
# 3.restart pod
name: generate-kcctl-docs
on:
push:
branches:
- 'master'
# This ensures that previous jobs for the branch are canceled when the branch is updated.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Generate kcctl docs
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate Kcctl Docs
run:
make cli
- name: Set up docker buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Docker login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
- name: Run buildx
run: |
docker buildx build --platform linux/amd64,linux/arm64 --push --file ./tools/kcctldocs-gen/generators/Dockerfile -t kubeclipper/kcctl-docs ./tools/kcctldocs-gen/generators
- name: Resrart Pod
uses: steebchen/kubectl@v2.1.1
with:
config: ${{ secrets.PROD_KUBECONFIG }}
version: v1.23.0 # specify kubectl binary version explicitly
command: rollout restart deploy kcctl-docs-deployment