Skip to content

Commit aaf3ada

Browse files
authored
Merge pull request #341 from ndeloof/master
automate compose-spec schema updates
2 parents 840dbdb + 0f4ea47 commit aaf3ada

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

Diff for: .github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
uses: golangci/golangci-lint-action@v2
1717
- name: Check license
1818
run: DOCKER_BUILDKIT=1 make check-license
19+
- name: Check schema
20+
run: make check-schema
1921

2022
test:
2123
strategy:

Diff for: .github/workflows/sync.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync compose-spec
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
jobs:
9+
schema:
10+
name: Update Schema
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/[email protected]
16+
17+
- name: Download schema
18+
run: curl -fSL -o schema/compose-spec.json https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
19+
20+
- name: Show diff
21+
run: git diff schema/compose-spec.json
22+
23+
- name: Create Pull Request
24+
uses: peter-evans/create-pull-request@v4
25+
with:
26+
title: Update compose-spec.json
27+
commit-message: Update compose-spec.json
28+
signoff: true
29+
branch: compose-spec

Diff for: Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ lint: build-validate-image
3838
check-license: build-validate-image
3939
docker run --rm $(IMAGE_PREFIX)validate bash -c "./scripts/validate/fileheader"
4040

41+
.PHONY: check-schema
42+
check-schema:
43+
curl -fSL -o schema/compose-spec.json https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
44+
git diff --exit-code schema/compose-spec.json
45+
4146
.PHONY: setup
4247
setup: ## Setup the precommit hook
4348
@which pre-commit > /dev/null 2>&1 || (echo "pre-commit not installed see README." && false)

0 commit comments

Comments
 (0)