We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e89f836 commit cea263cCopy full SHA for cea263c
3 files changed
action.yml
@@ -32,13 +32,13 @@ inputs:
32
runs:
33
using: "composite"
34
steps:
35
- # 差分があったときは差分を出力する
36
- - name: Show diff
+ # 差分があったときに検知する
+ - name: Detect diff
37
id: diff
38
shell: bash
39
if: github.event_name != 'pull_request' || github.event.action != 'closed'
40
working-directory: ${{inputs.working-directory}}
41
- run: ${{ github.action_path }}/src/show_diff.sh
+ run: ${{ github.action_path }}/src/detect_diff.sh
42
- name: Set env
43
id: set-env
44
src/detect_diff.sh
@@ -0,0 +1,11 @@
1
+#!/usr/bin/env bash
2
+
3
+git add -A
4
5
+if git diff --cached --quiet; then
6
+ result=""
7
+else
8
+ result="差分あり"
9
+fi
10
11
+echo "result=$result" >>"${GITHUB_OUTPUT}"
src/show_diff.sh
0 commit comments