--- name: pull-requests-open on: pull_request: types: - opened - edited - synchronize branches: - main jobs: commit-history-check: name: Check commit compliance runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Install commitizen run: pip3 install commitizen shell: bash working-directory: ./ - run: git log origin/${{ github.event.pull_request.base.ref }}.. - name: Verify commit message compliance run: | echo "cz check --rev-range origin/${{ gitea.event.pull_request.base.ref }}.." cz check --rev-range origin/${{ gitea.event.pull_request.base.ref }}.. shell: bash working-directory: ./ pre-commit-check: name: Check pre-commit status runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Install pre-commit run: pip3 install pre-commit shell: bash working-directory: ./ - name: Install pre-commit dependencies run: | # terraform-docs curl -sSLo /tmp/terraform-docs.tar.gz \ https://terraform-docs.io/dl/v0.18.0/terraform-docs-v0.18.0-$(uname)-amd64.tar.gz tar -xzf /tmp/terraform-docs.tar.gz -C /tmp ls -la ls -la /tmp chmod +x /tmp/terraform-docs mv /tmp/terraform-docs /usr/local/bin/terraform-docs rm -rf /tmp/terraform-docs* shell: bash working-directory: ./ - name: Verify pre-commit status run: pre-commit run --all shell: bash working-directory: ./