2020-03-03 19:51:02 +00:00
|
|
|
name: git-auto-commit
|
|
|
|
|
2021-09-10 12:46:57 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
2020-03-03 19:51:02 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-03-03 19:54:12 +00:00
|
|
|
git-auto-commit:
|
2020-03-03 19:51:02 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2023-02-11 11:23:24 +00:00
|
|
|
permissions:
|
2023-02-11 20:14:56 +00:00
|
|
|
# Give the default GITHUB_TOKEN write permission.
|
2023-02-11 11:23:24 +00:00
|
|
|
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
|
|
|
|
contents: write
|
|
|
|
|
2020-03-03 19:51:02 +00:00
|
|
|
steps:
|
2022-10-26 17:03:57 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-03-03 19:54:12 +00:00
|
|
|
|
2020-03-03 19:51:02 +00:00
|
|
|
- name: Use git-auto-commit-action
|
2020-03-03 20:00:40 +00:00
|
|
|
id: "auto-commit-action"
|
2020-03-03 19:51:02 +00:00
|
|
|
uses: ./
|
2020-03-03 20:00:40 +00:00
|
|
|
|
2020-03-03 20:04:57 +00:00
|
|
|
- name: "no changes detected"
|
2023-01-03 07:17:32 +00:00
|
|
|
if: steps.auto-commit-action.outputs.changes_detected == 'false'
|
2020-03-03 20:04:57 +00:00
|
|
|
run: "echo \"No changes detected\""
|
|
|
|
|
|
|
|
- name: "changes detected"
|
2023-01-03 07:17:32 +00:00
|
|
|
if: steps.auto-commit-action.outputs.changes_detected == 'true'
|
2020-03-03 20:04:57 +00:00
|
|
|
run: "echo \"Changes detected\""
|