diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 69c7d69..3c4f20a 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -1,3 +1,5 @@ +--- + name: Build on: [push] @@ -10,4 +12,4 @@ jobs: - uses: actions/checkout@v2 - name: Build Docker Image run: | - docker build -t dymo-cups . \ No newline at end of file + docker build -t dymo-cups . diff --git a/.github/workflows/Static Analysis.yaml b/.github/workflows/Static Analysis.yaml index 44ff976..25f249c 100644 --- a/.github/workflows/Static Analysis.yaml +++ b/.github/workflows/Static Analysis.yaml @@ -1,55 +1,63 @@ +--- + name: Static-Analysis on: [push] jobs: - Shell_Lint_Check: - name: Shell Lint Check - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Download Packages - run: | - sudo apt-get install shellcheck - - - name: Shell Check - run: | - shellcheck *.sh - - Dockerfile_Lint_Check: - name: Dockerfile Lint Check - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Download Packages - run: | - sudo wget -O /bin/hadolint https://github.com/hadolint/hadolint/releases/download/v2.10.0/hadolint-Linux-x86_64 - sudo chmod +x /bin/hadolint . - - - name: Dockerfile Lint - run: | - hadolint --failure-threshold error --verbose *Dockerfile - - - name: Docker Compose Lint - run: | - docker-compose config || { echo "Invalid Docker Compose file"; exit 1; } - - Markdown_Lint_Check: - name: Markdown Lint Check - runs-on: ubuntu-latest - steps: - - name: Install markdownlint-cli - run: npm install -g markdownlint-cli - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Run markdownlint - run: markdownlint '**/*.md' - - - \ No newline at end of file + Shell_Lint_Check: + name: Shell Lint Check + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Download Packages + run: | + sudo apt-get install shellcheck + - name: Shell Check + run: | + echo "Running Shell Check" + shellcheck *.sh + + Dockerfile_Lint_Check: + name: Dockerfile Lint Check + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Download Packages + run: | + sudo wget -O /bin/hadolint https://github.com/hadolint/hadolint/releases/download/v2.10.0/hadolint-Linux-x86_64 + sudo chmod +x /bin/hadolint . + - name: Dockerfile Lint + run: | + hadolint --failure-threshold error --verbose *Dockerfile + - name: Docker Compose Lint + run: | + docker-compose config || { echo "Invalid Docker Compose file"; exit 1; } + + Markdown_Lint_Check: + name: Markdown Lint Check + runs-on: ubuntu-latest + steps: + - name: Install markdownlint-cli + run: npm install -g markdownlint-cli + - name: Checkout code + uses: actions/checkout@v2 + - name: Run markdownlint + run: | + echo "Running markdownlint" + markdownlint '**/*.md' + + YAML_Lint_Check: + name: YAML Lint Check + runs-on: ubuntu-latest + steps: + - name: Install yamllint + run: sudo apt install yamllint + - name: Checkout code + uses: actions/checkout@v2 + - name: Run yamllint + run: | + echo "Checking YAML files" + yamllint -c .yamllint.yaml .github/**/**.yaml diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..eed2490 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,35 @@ +--- + +yaml-files: + - '*.yaml' + - '*.yml' + - '.yamllint' + +rules: + braces: enable + brackets: enable + colons: enable + commas: enable + comments: + level: warning + comments-indentation: + level: warning + document-end: disable + document-start: + level: warning + empty-lines: enable + empty-values: disable + hyphens: enable + indentation: enable + key-duplicates: enable + key-ordering: disable + line-length: + max: 120 + level: warning + new-line-at-end-of-file: enable + new-lines: enable + octal-values: disable + quoted-strings: disable + trailing-spaces: enable + truthy: + level: warning \ No newline at end of file