From 1d6b0800a594870ade7da12b403632ff750b37a4 Mon Sep 17 00:00:00 2001 From: Prakash Date: Wed, 13 May 2020 19:21:30 +0530 Subject: [PATCH 1/2] lint apply --- .github/workflows/lint.yml | 31 +++++++++++++++++++++++++++++++ .yamllint | 9 +++++++++ 2 files changed, 40 insertions(+) create mode 100755 .github/workflows/lint.yml create mode 100755 .yamllint diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100755 index 0000000..991b2c6 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +--- +name: Lint +'on': + pull_request: + push: + branches: + - master + +jobs: + + test: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Check out the codebase. + uses: actions/checkout@v2 + + - name: Set up Python 3.7. + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install test dependencies. + run: pip3 install yamllint ansible-lint + + - name: Run yamllint. + run: yamllint . + + - name: Run ansible-lint. + run: ansible-lint diff --git a/.yamllint b/.yamllint new file mode 100755 index 0000000..8f19687 --- /dev/null +++ b/.yamllint @@ -0,0 +1,9 @@ +--- +extends: default + +rules: + line-length: + max: 120 + level: warning + truthy: + allowed-values: ['true', 'false', 'yes', 'no'] From b735350082af97226b66b10d13cb1596734fc739 Mon Sep 17 00:00:00 2001 From: Prakash Date: Thu, 14 May 2020 22:15:39 +0530 Subject: [PATCH 2/2] slack notification --- .github/workflows/lint.yml | 10 ++++++++++ handlers/main.yml | 1 + 2 files changed, 11 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 991b2c6..3da0ef1 100755 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,3 +29,13 @@ jobs: - name: Run ansible-lint. run: ansible-lint + - name: 'Slack Notification' + uses: clouddrove/action-slack@v2 + with: + status: ${{ job.status }} + fields: repo,author + author_name: 'Clouddrove' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + if: always() diff --git a/handlers/main.yml b/handlers/main.yml index 92d9b96..df66ab4 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -21,3 +21,4 @@ service: name: apache2 state: restarted + enabled: ture