mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-22 05:28:25 +00:00
Merge pull request #2482 from Bevisy/main-815
ci: Weekly check whether the docs url is alive
This commit is contained in:
commit
aa6886f1ed
44
.github/workflows/docs-url-alive-check.yaml
vendored
Normal file
44
.github/workflows/docs-url-alive-check.yaml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 23 * * 0'
|
||||||
|
|
||||||
|
name: Docs URL Alive Check
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version: [1.17.x]
|
||||||
|
os: [ubuntu-20.04]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
target_branch: ${{ github.base_ref }}
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ runner.workspace }}/kata-containers
|
||||||
|
- name: Set env
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
||||||
|
run: |
|
||||||
|
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
|
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||||
|
- name: Checkout code
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
path: ./src/github.com/${{ github.repository }}
|
||||||
|
- name: Setup
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
||||||
|
run: |
|
||||||
|
cd ${GOPATH}/src/github.com/${{ github.repository }} && ./ci/setup.sh
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ runner.workspace }}/kata-containers
|
||||||
|
# docs url alive check
|
||||||
|
- name: Docs URL Alive Check
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
||||||
|
run: |
|
||||||
|
cd ${GOPATH}/src/github.com/${{ github.repository }} && make docs-url-alive-check
|
8
Makefile
8
Makefile
@ -39,10 +39,16 @@ generate-protocols:
|
|||||||
static-checks: build
|
static-checks: build
|
||||||
bash ci/static-checks.sh
|
bash ci/static-checks.sh
|
||||||
|
|
||||||
|
docs-url-alive-check:
|
||||||
|
bash ci/docs-url-alive-check.sh
|
||||||
|
|
||||||
.PHONY: \
|
.PHONY: \
|
||||||
all \
|
all \
|
||||||
binary-tarball \
|
binary-tarball \
|
||||||
default \
|
default \
|
||||||
install-binary-tarball \
|
install-binary-tarball \
|
||||||
logging-crate-tests \
|
logging-crate-tests \
|
||||||
static-checks
|
static-checks \
|
||||||
|
docs-url-alive-check
|
||||||
|
|
||||||
|
|
||||||
|
12
ci/docs-url-alive-check.sh
Executable file
12
ci/docs-url-alive-check.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021 Easystack Inc.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cidir=$(dirname "$0")
|
||||||
|
source "${cidir}/lib.sh"
|
||||||
|
|
||||||
|
run_docs_url_alive_check
|
@ -44,3 +44,12 @@ run_go_test()
|
|||||||
clone_tests_repo
|
clone_tests_repo
|
||||||
bash "$tests_repo_dir/.ci/go-test.sh"
|
bash "$tests_repo_dir/.ci/go-test.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_docs_url_alive_check()
|
||||||
|
{
|
||||||
|
clone_tests_repo
|
||||||
|
# Make sure we have the targeting branch
|
||||||
|
git remote set-branches --add origin "${branch}"
|
||||||
|
git fetch -a
|
||||||
|
bash "$tests_repo_dir/.ci/static-checks.sh" --docs --all "github.com/kata-containers/kata-containers"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user