diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..8cecff4 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,47 @@ +--- + +name: Lint Code Base + +on: [ workflow_call ] + +############### +# Set the Job # +############### +jobs: + build: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest + + ############################################ + # Grant status permission for MULTI_STATUS # + ############################################ + permissions: + contents: read + packages: read + statuses: write + + ################## + # Load all steps # + ################## + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper + # list of changed files within `super-linter` + fetch-depth: 0 + + ################################ + # Run Linter against code base # + ################################ + - name: Lint Code Base + uses: super-linter/super-linter@v5 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 9991747..11cf5da 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -1,26 +1,16 @@ +--- +name: Publish Release + on: push: branches: - main jobs: - lint-code: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - # Full git history is needed to get a proper list of changed files within `super-linter` - fetch-depth: 0 - - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: "main" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + linter: + uses: ./.github/workflows/linter.yml publish-release: runs-on: ubuntu-latest - needs: lint-code + needs: linter steps: - name: Publish Release uses: ncipollo/release-action@v1 diff --git a/README.md b/README.md index 759f692..a8b6b8d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +[![GitHub Super-Linter](https://github.com/EZSCALE/virtfusion-whmcs-module/actions/workflows/linter/badge.svg)](https://github.com/marketplace/actions/super-linter) +![GitHub](https://img.shields.io/github/license/EZSCALE/virtfusion-whmcs-module) +![GitHub issues](https://img.shields.io/github/issues/EZSCALE/virtfusion-whmcs-module) +![GitHub pull requests](https://img.shields.io/github/issues-pr/EZSCALE/virtfusion-whmcs-module) + # VirtFusion Direct Provisioning Module for WHMCS This module requires VirtFusion v1.7.3 or higher as this is what it's based on. Please refer to the official [documenataion](https://docs.virtfusion.com/integrations/whmcs).