84 lines (70 loc) · 1.96 KB
/
docs_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Documentation Validation
on:
push:
paths:
- '.github/workflows/docs_tests.yml'
- 'cmd/**'
- 'docs/**'
- 'README.md'
- 'README_ru.md'
env:
GOPATH: ${{ github.workspace }}/go
jobs:
check_cli_and_readme_partials:
name: Check CLI and README partials
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Setup Golang caches
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Install werf build dependencies
run: sudo apt-get install -y libbtrfs-dev
- name: Checkout code
uses: actions/checkout@v3
- name: Test
run: |
./scripts/ci/git.sh
./scripts/ci/go-test.sh ./integration/suites/docs
check_links:
name: Check broken links
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
lang: [ru, en]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Setup Golang caches
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check links
run: make docs_check_broken_links_${{ matrix.lang }}
env:
WERF_REPO: "ghcr.io/${{ github.repository_owner }}/werfio"