Skip to content

Commit 441dbca

Browse files
authored
Merge pull request creativecommons#1234 from creativecommons/gh-actions
replace circle ci with github actions
2 parents 0fbe77f + 49b6579 commit 441dbca

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed

.circleci/config.yml

-9
This file was deleted.

.github/workflows/tidy.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
jobs:
10+
tidy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
15+
- name: Install system dependencies
16+
env:
17+
DEBIAN_FRONTEND: noninteractive
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y tidy
21+
22+
# https://github.com/actions/checkout
23+
- uses: actions/checkout@v2
24+
25+
- name: Tidy Legal Code
26+
run: |
27+
./tools/tidy_legalcode.sh

tools/tidy_legalcode.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -o nounset
3+
set -o pipefail
4+
5+
tidy -errors -quiet -utf8 --show-filename yes --show-warnings no \
6+
docroot/legalcode/*.html \
7+
2>&1 | sed -e'/^Tidy: /d'
8+
case ${?} in
9+
2) exit 2;; # errors
10+
1) exit 0;; # warning (ignored)
11+
0) exit 0;; # success
12+
esac

0 commit comments

Comments
 (0)