Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
feat: add GitHub default templates (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap authored Sep 14, 2024
1 parent a2ad87e commit 5b9ee08
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
skip_list:
# Role name virtio-win does not match ``^[a-z][a-z0-9_]+$`` pattern
- 'role-name'
- "role-name"
# Lines should be no longer than 160 chars
- 'yaml'
- "yaml"

verbosity: 1
4 changes: 3 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
// Keep the extends started with ":" at the end of the list to allow overriding
extends: [
"config:recommended",
"docker:pinDigests",
"helpers:pinGitHubActionDigestsToSemver",
"security:openssf-scorecard",
":disableDependencyDashboard",
":docker",
":disableRateLimiting",
":docker",
":enableVulnerabilityAlertsWithLabel(security)",
":pinSkipCi",
],
"git-submodules": {
enabled: true,
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/markdown-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ jobs:
markdownlint-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Markdown Lint
uses: ruzickap/action-my-markdown-linter@919d3735df9bbc094d206521a774133ec8f3c4ca # v1.1.0
uses: ruzickap/action-my-markdown-linter@26b4129bf0352527e60b5bd739357af63df1b7bf # v1.2.0
with:
exclude: |
CHANGELOG.md
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Link Checker
uses: ruzickap/action-my-markdown-link-checker@1126c6a5c31df989b4f3b1a8072ad125887b4c47 # v1.3.0
Expand All @@ -41,10 +41,10 @@ jobs:
markdown-spell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install Node.js LTS version
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3

- name: Install markdown-spellcheck
run: npm install -g markdown-spellcheck
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout Code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Restore lychee cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
Expand All @@ -34,12 +34,12 @@ jobs:
# Extract: ```bash ... ```
sed -n "/^ \`\`\`\(bash\|shell\)$/,/^ \`\`\`$/p" "${FILE}" | sed '/^ ```*/d; s/^ //' >> README.sh
done
ls -la README.sh
chmod a+x README.sh
- name: 💡 MegaLinter
uses: oxsecurity/megalinter@03986e6993ccf699a22451118520680b438e7d2a # v7.11.1
uses: oxsecurity/megalinter@5199c6377b4cb7faff749a1971636f3343db9fe6 # v7.12.0
env:
GITHUB_COMMENT_REPORTER: false
GITHUB_STATUS_REPORTER: true
# Disabled due to error: [GitHub Status Reporter] Error posting Status for REPOSITORY with ...: 403
GITHUB_STATUS_REPORTER: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 3 additions & 4 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: molecule

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
push:
Expand All @@ -17,20 +18,18 @@ jobs:
strategy:
matrix:
distro:
- centos8
- ubuntu2204
- ubuntu2004
- ubuntu1804
- debian10
- fedora33

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: ${{ github.event.repository.name }}

- name: Set up Python 3.
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.x"

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release-ansible-galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: ${{ github.event.repository.name }}

- name: Set up Python 3
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.x"

- name: Install Ansible
run: pip3 install ansible-base

- name: Trigger a new import on Galaxy
env:
GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }}
run: |
cd "${GITHUB_REPOSITORY#*/}"
ansible-galaxy role import \
--api-key "${{ secrets.GALAXY_API_KEY }}" "${GITHUB_REPOSITORY%/*}" "${GITHUB_REPOSITORY##*/}"
--api-key "${GALAXY_API_KEY}" "${GITHUB_REPOSITORY%/*}" "${GITHUB_REPOSITORY##*/}"
9 changes: 8 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }}
private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}

- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
with:
release-type: simple
token: ${{ steps.app-token.outputs.token }}
13 changes: 7 additions & 6 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- main
- "!renovate/*"
schedule:
- cron: "0 0,2,4 * * 0"
- cron: "0 0-3 * * 0"

env:
# https://docs.renovatebot.com/troubleshooting/#log-debug-levels
Expand All @@ -45,17 +45,18 @@ jobs:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: actions/create-github-app-token@a0de6af83968303c8c955486bf9739a57d23c7f1 # v1.10.0
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }}
private-key: "${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}"
private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}

- name: 💡 Self-hosted Renovate
uses: renovatebot/github-action@2d90417499f45ff78a09586f7b9874b19817dba3 # v40.1.0
uses: renovatebot/github-action@259200be4d976a76196ec8985b0dddcaf1733b47 # v40.2.0
with:
token: "${{ steps.app-token.outputs.token }}"
token: ${{ steps.app-token.outputs.token }}
11 changes: 9 additions & 2 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: semantic-pull-request

on:
workflow_dispatch:
pull_request_target:
types:
- opened
Expand All @@ -15,6 +16,12 @@ jobs:
semantic-pull-request:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@cfb60706e18bc85e8aec535e3c577abe8f70378e # v5.5.2
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }}
private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}

- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: stale

on:
workflow_dispatch:
schedule:
- cron: "9 9 * * *"

Expand Down
2 changes: 1 addition & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ REPOSITORY_DEVSKIM_ARGUMENTS: --ignore-globs CHANGELOG.md --ignore-rule-ids DS16

REPOSITORY_KICS_ARGUMENTS: --fail-on high

REPOSITORY_TRIVY_ARGUMENTS: --ignorefile .trivyignore.yaml --severity HIGH,CRITICAL
REPOSITORY_TRIVY_ARGUMENTS: --ignorefile .trivyignore.yaml --severity HIGH,CRITICAL --ignore-unfixed

TERRAFORM_TFLINT_UNSECURED_ENV_VARIABLES:
- GITHUB_TOKEN
Expand Down
4 changes: 3 additions & 1 deletion lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ exclude = [
# Ignore all URLs with '{ ... }' - BASH / Ansible variable in URL
'%7B.*%7D',
# Ignore all URLs which starts with 'file://'
'file://'
'file://',
'https?://packages\.vmware\.com/.*',
]

# Exclude these filesystem paths from getting checked
exclude_path = [
"CHANGELOG.md",
"package-lock.json",
]

# Exclude all private IPs from checking.
Expand Down
4 changes: 3 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
role_name_check: 1
dependency:
name: galaxy
options:
ignore-errors: true
driver:
name: docker
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down

0 comments on commit 5b9ee08

Please sign in to comment.