-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.89 KB
/
Copy pathact-validation.yml
File metadata and controls
57 lines (48 loc) · 1.89 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
56
57
name: Act Validation
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
act-validation:
runs-on: ubuntu-latest
env:
ACT_VERSION: v0.2.84
MARKDOWNLINT_CLI2_VERSION: 0.22.1
MBAKE_VERSION: 1.4.6
steps:
- name: Check out repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Set up Rust
uses: leynos/shared-actions/.github/actions/setup-rust@3c1fa01bcf4c26dac79975c18b74c01d577dcf95
with:
toolchain: stable
- name: Install template test tools
run: |
act_archive=act_Linux_x86_64.tar.gz
act_url="https://github.com/nektos/act/releases/download/${ACT_VERSION}/${act_archive}"
curl -fsSLo "${act_archive}" "${act_url}"
act_sha256="$(
curl -fsSL "https://api.github.com/repos/nektos/act/releases/tags/${ACT_VERSION}" |
python -c 'import json, sys; release = json.load(sys.stdin); print(next(asset["digest"].split(":", 1)[1] for asset in release["assets"] if asset["name"] == "act_Linux_x86_64.tar.gz"))'
)"
printf '%s %s\n' "${act_sha256}" "${act_archive}" | sha256sum -c -
sudo tar -xzf "${act_archive}" -C /usr/local/bin act
npm install -g "markdownlint-cli2@${MARKDOWNLINT_CLI2_VERSION}"
uv tool install "mbake==${MBAKE_VERSION}"
- name: Check Docker runtime
run: docker info
- name: Run template tests with act validation
env:
ACT_GITHUB_TOKEN: ${{ github.token }}
run: make test WITH_ACT=1