Skip to content

Seperate steps to resolve nothing to commit #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

cruelladevil
Copy link
Contributor

@cruelladevil cruelladevil commented Apr 19, 2022

README.md에 변경사항이 없으면 get diff 에서 끝나고,

- name: get diff
  id: get_diff
  run: |
    git diff --quiet ./README.md || echo "::set-output name=new_changes_exist::true"

변경사항이 있으면, update README.md 가 실행됩니다.

- name: update README.md
  if: steps.get_diff.outputs.new_changes_exist == 'true'
  run: |
    git add ./README.md
    git config user.name github-actions
    git config user.email [email protected]
    git commit -m "Automatic Update README.md"
    git push

그러므로 앞으로 README.md에 변경사항이 없을 시에도 ci build는 통과될 것입니다.

@codeisneverodd codeisneverodd changed the base branch from main to cruelladevil-readme-test April 20, 2022 00:57
@codeisneverodd codeisneverodd merged commit 316cf67 into codeisneverodd:cruelladevil-readme-test Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants