add debt-api payment-platform v2 integration topics (#1044) #2295
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| permissions: | |
| contents: write # Granting only the permission needed to commit and push | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@v2 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{github.head_ref}} | |
| - name: Check if we need to update generated files | |
| run: | | |
| make generate | |
| git add . | |
| # Check if there are any staged changes | |
| if ! git diff --staged --exit-code; then | |
| echo "Generated files are out of date on branch '${{ github.ref_name }}'. Committing and pushing changes." | |
| git config user.name "GITHUB ACTIONS AUTOMATED USER" | |
| git config user.email "[email protected]" | |
| # The commit & push will not trigger a new workflow run as they're using the default GITHUB_TOKEN. | |
| git commit -m "[AUTOMATED]: generate files" | |
| git push | |
| else | |
| echo "Generated files are up to date." | |
| fi | |
| - uses: hashicorp/[email protected] | |
| - uses: actions/[email protected] | |
| - uses: terraform-linters/setup-tflint@v4 | |
| - uses: pre-commit/[email protected] |