-
Notifications
You must be signed in to change notification settings - Fork 262
55 lines (46 loc) · 1.55 KB
/
Copy pathpr-validation-docs.yml
File metadata and controls
55 lines (46 loc) · 1.55 KB
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
name: Validate Documentation Links
on:
workflow_dispatch:
# no content, allows manual triggering
pull_request:
branches:
- main
paths:
- "docs/**"
merge_group:
branches:
- main
permissions: {}
jobs:
validate-site-links:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # pinned to 7.0.1
with:
fetch-depth: 0 # required to access tags
submodules: "true"
- name: Log in to GitHub Docker Registry
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # pinned to v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build devcontainer image
run: |
docker build --cache-from ghcr.io/azure/azure-service-operator/aso-devcontainer:latest --tag devcontainer:latest -f .devcontainer/Dockerfile .
env:
DOCKER_BUILDKIT: 1
- name: Run devcontainer image
id: devcontainer
run: |
container_id=$(docker create -w /workspace -v $GITHUB_WORKSPACE:/workspace -v /var/run/docker.sock:/var/run/docker.sock devcontainer:latest)
docker start "$container_id"
echo "container_id=$container_id" >> $GITHUB_ENV
- name: Build & validate docs site
run: |
container_id=${{ env.container_id }}
docker exec "$container_id" task build-docs-site