Documentation available in Portuguese (pt-BR) here.
Action to validate if the content of a file (or directory) has changed.
Useful for ensuring that quality and/or safety processes are not accidentally - or not - changed by developers.
- Repository
- Actions [Read and write]
- Commit status [Read and write]
- Contents [Read and write]
- Pull requests [Read and write]
Secret CREDENTIALS_GITHUB_APP_PRIVATE_KEY
on PEM format:
-----BEGIN RSA PRIVATE KEY-----
9999999999999999999999999999999999999999999999999999999999999999
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
....
-----END RSA PRIVATE KEY-----
- Repo (Full control of private repositories)
-
Create directory
.github/worfklows
in the root of your project; -
Create file
content-change-validation.yaml
with content similar to the following:
name: Content Change Validation
on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- main
jobs:
content-change-validation:
runs-on: ubuntu-latest
steps:
- name: Generate Token from GitHub App
id: generate-token-github-app
uses: padupe/action-generate-token-github-app@1.1.3
with:
appId: ${{ secrets.CREDENTIALS_GITHUB_APP_ID }}
installationId: ${{ secrets.CREDENTIALS_GITHUB_APP_INSTALLATION_ID }}
privateKey: ${{ secrets.CREDENTIALS_GITHUB_APP_PRIVATE_KEY }}
- name: Content Change Validation
uses: padupe/action-content-change-validation@1.1.4
with:
directoryOrFile: .github/workflows
gitHubToken: ${{ steps.generate-token-github-app.outputs.gitHubToken }}
-
Create directory
.github/worfklows
in the root of your project; -
Create file
content-change-validation.yaml
with content similar to the following:
name: Content Change Validation
on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- main
jobs:
content-change-validation:
runs-on: ubuntu-latest
steps:
- name: Content Change Validation
uses: padupe/action-content-change-validation@1.1.4
with:
directoryOrFile: .github/workflows
gitHubToken: ${{ secrets.PAT_TOKEN }}
Boolean value.
Check our CONTRIBUTING guidelines.