From da31e077a9c55a6eeec83187700130d99b751726 Mon Sep 17 00:00:00 2001 From: streambinder Date: Sat, 19 Aug 2023 12:01:14 +0200 Subject: [PATCH] ci(push): add linting and doc-notifying --- .github/workflows/push.yml | 56 ++++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 25 ----------------- 2 files changed, 56 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/push.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..6804b84 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,56 @@ +name: push + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v5 + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: codespell-project/actions-codespell@v2 + with: + check_filenames: true + ignore_words_list: erro + skip: it.yml + test: + needs: [commitlint,codespell] + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + sudo apt update + sudo apt install -y libgcrypt20-dev libgnutls28-dev + make test + notify: + needs: [test] + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + docs: + - 'docs/**' + - uses: peter-evans/repository-dispatch@v2 + if: steps.filter.outputs.docs == 'true' + with: + token: ${{ secrets.GH_ACTIONS_VPNC }} + repository: streambinder/streambinder + event-type: doc-sync + client-payload: '{"repo": "${{ github.repository }}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 9c8205c..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: test - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Install system dependencies - run: | - sudo apt update - sudo apt install -y libgcrypt20-dev libgnutls28-dev - - - name: Run test - run: | - make test