actions-go/modified-file
Sets outputs wheter and which matching files has been modified since between 2 commits It is the equivalent of `git log base..head`. It uses the github API to compare both commits: https://developer.github.com/v3/repos/commits/#compare-two-commits
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Feb 8, 2022
- License
- MIT
- Runtime
- Deprecated runtime
Pinned Snippet
uses: actions-go/modified@b272e2455b3cce9fe2f7b49cca8bd86aa7769d77 # no releases — HEAD as of 2026-07-22tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| head | The commit to be compared to base. This parameter is required when running on an event different from push or pullrequest. When handling a pullrequest event, it defaults to the pullrequest head sha. When handling a push event, it defauts to the `After` field of the push event: https://developer.github.com/v3/activity/events/types/#pushevent | — | — |
| base | The commit head is compared to. This parameter is required when running on an event different from push or pullrequest. When handling a pullrequest event, it defaults to the pullrequest base sha. When handling a push event, it defauts to the `Before` field of the push event: https://developer.github.com/v3/activity/events/types/#pushevent | — | — |
| pattern | — | yes | — |
| use-glob | Whether to use the simplee glob syntax, extended with the `**` pattern matching paths with path separator | — | true |
| token | Auth token used to fetch the repository. The token is stored in the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the token from the git config. [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) | — | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| modified | true when any modified file between base and head matches pattern |
| modified-files | a json encoded list of all files modified between base and head |