mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-21 23:29:59 -05:00
Merge pull request #26 from kreuzwerker/ci/fix-website-ci
ci: fix website ci
This commit is contained in:
commit
cf34e9e1b1
4 changed files with 61 additions and 42 deletions
50
.github/workflows/website.yaml
vendored
50
.github/workflows/website.yaml
vendored
|
|
@ -1,38 +1,36 @@
|
||||||
---
|
## These checks will be superseded by documentation.yml
|
||||||
name: Website
|
## when the provider documentation layout is moved to
|
||||||
|
## the Terraform Registry layout.
|
||||||
|
name: Website Checks
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- "release/**"
|
- 'release/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
types: ['opened', 'synchronize']
|
|
||||||
paths:
|
paths:
|
||||||
- '**.go'
|
- .github/workflows/website.yaml
|
||||||
- 'vendor/**'
|
- website/docs/**
|
||||||
- '.github/workflows/**'
|
- .markdownlint.yml
|
||||||
|
|
||||||
env:
|
|
||||||
GO_VERSION: "1.15"
|
|
||||||
GOPROXY: https://gocenter.io,https://proxy.golang.org,direct
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
markdown-link-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||||
|
name: markdown-link-check website/docs/**/*.markdown
|
||||||
with:
|
with:
|
||||||
go-version: '1.15'
|
use-quiet-mode: 'yes'
|
||||||
- run: bash scripts/gogetcookie.sh
|
use-verbose-mode: 'yes'
|
||||||
- run: |
|
config-file: '.markdownlinkcheck.json'
|
||||||
cat /etc/issue
|
folder-path: 'website/docs'
|
||||||
echo "whoami" && whoami
|
file-extension: '.markdown'
|
||||||
sudo mkdir -p /go && sudo chown -R $(whoami) /go
|
markdown-lint:
|
||||||
export GOPATH="/go"
|
runs-on: ubuntu-latest
|
||||||
echo "GOPATH: $GOPATH"
|
steps:
|
||||||
make website-test
|
- uses: actions/checkout@v2
|
||||||
|
- uses: avto-dev/markdown-lint@v1
|
||||||
|
with:
|
||||||
|
args: 'website/docs'
|
||||||
|
config: '.markdownlint.yml'
|
||||||
|
|
|
||||||
14
.markdownlinkcheck.json
Normal file
14
.markdownlinkcheck.json
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"ignorePatterns": [
|
||||||
|
],
|
||||||
|
"replacementPatterns": [
|
||||||
|
{
|
||||||
|
"pattern": "^/docs/providers/docker/r/(.*).html",
|
||||||
|
"replacement": "/github/workspace/website/docs/r/$1.html.markdown"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "^/docs/providers/docker/d/(.*).html",
|
||||||
|
"replacement": "/github/workspace/website/docs/d/$1.html.markdown"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
22
.markdownlint.yml
Normal file
22
.markdownlint.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Configuration for markdownlint
|
||||||
|
# https://github.com/DavidAnson/markdownlint#configuration
|
||||||
|
|
||||||
|
default: true
|
||||||
|
|
||||||
|
# Disabled Rules
|
||||||
|
# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md
|
||||||
|
|
||||||
|
MD001: false
|
||||||
|
MD004: false
|
||||||
|
MD007: false
|
||||||
|
MD009: false
|
||||||
|
MD010: false
|
||||||
|
MD012: false
|
||||||
|
MD013: false
|
||||||
|
MD014: false
|
||||||
|
MD022: false
|
||||||
|
MD031: false
|
||||||
|
MD032: false
|
||||||
|
MD033: false
|
||||||
|
MD034: false
|
||||||
|
MD047: false
|
||||||
17
GNUmakefile
17
GNUmakefile
|
|
@ -1,6 +1,5 @@
|
||||||
TEST?=$$(go list ./... |grep -v 'vendor')
|
TEST?=$$(go list ./... |grep -v 'vendor')
|
||||||
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
||||||
WEBSITE_REPO=github.com/hashicorp/terraform-website
|
|
||||||
PKG_NAME=docker
|
PKG_NAME=docker
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
@ -52,19 +51,5 @@ test-compile:
|
||||||
fi
|
fi
|
||||||
go test -c $(TEST) $(TESTARGS)
|
go test -c $(TEST) $(TESTARGS)
|
||||||
|
|
||||||
website:
|
.PHONY: build test testacc vet fmt fmtcheck errcheck test-compile
|
||||||
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
|
|
||||||
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
|
|
||||||
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
|
|
||||||
endif
|
|
||||||
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
|
|
||||||
|
|
||||||
website-test:
|
|
||||||
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
|
|
||||||
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
|
|
||||||
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
|
|
||||||
endif
|
|
||||||
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
|
|
||||||
|
|
||||||
.PHONY: build test testacc vet fmt fmtcheck errcheck test-compile website website-test
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue