Skip to content

Commit

Permalink
Deploy 1c451e1 to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Deploy from CI committed Apr 3, 2024
0 parents commit 1172783
Show file tree
Hide file tree
Showing 73 changed files with 15,290 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.yml linguist-detectable=true
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: mdbook
on:
push:
branches: [master]
paths:
- 'docs/**'
- 'README.md'
pull_request:
paths:
- 'docs/**'
- 'README.md'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build mdbook
run: |
cd docs
mdbook build
- name: Deploy to GitHub Pages
run: |
git worktree add gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
mv ../docs/book/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages
41 changes: 41 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: molecule
on: workflow_dispatch

jobs:
molecule:
runs-on: macos-10.15
steps:
- name: Checkout codebase
uses: actions/checkout@v3

- name: Setup Python3
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-ansible

- name: Cache Vagrant box
uses: actions/cache@v3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('ansible/molecule/common/molecule.yml') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: Install dependencies
run: |
pip install -q --disable-pip-version-check wheel
pip install -q --disable-pip-version-check ansible molecule-vagrant
env:
PIP_CACHE_DIR: ~/.cache/pip

- name: Test common
run: molecule test -s common
working-directory: ansible
env:
ANSIBLE_FORCE_COLOR: "True"
22 changes: 22 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: pre-commit
on:
push:
branches: [master]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Setup Python3
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Pre-commit
uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.cache/*
.venv/*
cloud-config

# secrets
certs/*
!certs/.gitkeep
*.crt
secrets.*
vault.txt

# ansible
**/test.yml
**/testca/vault/vault*

# terraform
**/.terraform/*
*.tfstate
*.tfstate.*
*.tfvars
tf_ansible_*

# packer
*.pkrvars.hcl
**/builds/*

# vagrant
**/.vagrant/*

# nomad
input.vars

# docs
**/site/*
**/book/*
**/public/*
9 changes: 9 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[extend]
useDefault = true

[allowlist]
# testing CA for Vault
paths = [
'''ansible/molecule/vault/testca''',
'''ansible/molecule/vault/testca\/\.*''',
]
52 changes: 52 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
default_stages: [push, commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-added-large-files

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: detect-private-key
exclude: ansible/molecule/vault/testca

- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.0
hooks:
- id: gitleaks-docker

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.83.5
hooks:
- id: terraform_fmt
args:
- --args=-diff
- --args=-recursive
- id: terraform_validate

- repo: local
hooks:
- id: packer_fmt
name: Packer fmt
description: Rewrites all Packer files in canonical format
language: script
entry: ./bin/packer-fmt
files: (\.pkr\.(hcl|json)|\.pkrvars\.hcl)$
require_serial: true

- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.22
hooks:
- id: packer-validate

# - repo: https://github.com/ansible-community/ansible-lint
# rev: v6.22.0
# hooks:
# - id: ansible-lint
# entry: ansible-lint -c ansible/.ansible-lint ansible
# pass_filenames: false
Loading

0 comments on commit 1172783

Please sign in to comment.