mirror of
https://github.com/PAPAMICA/docker-compose-collection.git
synced 2026-01-18 16:27:25 +01:00
add yamlint
This commit is contained in:
31
.github/workflows/cicd.yml
vendored
31
.github/workflows/cicd.yml
vendored
@@ -1,36 +1,31 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: CI
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the master branch
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install yamllint
|
||||
run: pip install yamllint
|
||||
- name: Lint YAML files
|
||||
run: yamllint -d .github/workflows/conf_yaml ./composes-files/*
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Runs a single command using the runners shell
|
||||
- name: Generate json file
|
||||
run: python3 .github/workflows/generate-template-json.py
|
||||
- name: update file and push to remote
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git add -A
|
||||
git commit -m "Automatic generation of the file templates-portainer.json"
|
||||
git push
|
||||
|
||||
27
.github/workflows/conf_yaml
vendored
Normal file
27
.github/workflows/conf_yaml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
braces:
|
||||
level: warning
|
||||
max-spaces-inside: 1
|
||||
brackets:
|
||||
level: warning
|
||||
max-spaces-inside: 1
|
||||
colons:
|
||||
level: warning
|
||||
commas: disable
|
||||
comments: disable
|
||||
comments-indentation: disable
|
||||
document-start: disable
|
||||
empty-lines:
|
||||
level: warning
|
||||
hyphens:
|
||||
level: warning
|
||||
indentation:
|
||||
level: error
|
||||
indent-sequences: consistent
|
||||
new-line-at-end-of-file: disable
|
||||
line-length: disable
|
||||
truthy: disable
|
||||
Reference in New Issue
Block a user