Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
fix: fix delete
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Sep 23, 2022
1 parent f827490 commit 3b4e18b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,23 @@ runs:
cat << EOS >> "$GITHUB_ENV"
GHA_REF_NAME=${{fromJSON(inputs.data).event.ref}}
EOS
if: env.GHA_EVENT_NAME == 'create'
if: contains(fromJSON('["create", "delete"]'), env.GHA_EVENT_NAME)

- shell: bash
run: |
cat << EOS >> "$GITHUB_ENV"
GHA_REF=refs/heads/${{fromJSON(inputs.data).event.ref}}
EOS
if: "env.GHA_EVENT_NAME == 'create' && fromJSON(inputs.data).event.ref_type == 'branch'"
if: |
contains(fromJSON('["create", "delete"]'), env.GHA_EVENT_NAME) && fromJSON(inputs.data).event.ref_type == 'branch'
- shell: bash
run: |
cat << EOS >> "$GITHUB_ENV"
GHA_REF=refs/tags/${{fromJSON(inputs.data).event.ref}}
EOS
if: "env.GHA_EVENT_NAME == 'create' && fromJSON(inputs.data).event.ref_type == 'tag'"
if: |
contains(fromJSON('["create", "delete"]'), env.GHA_EVENT_NAME) && fromJSON(inputs.data).event.ref_type == 'tag'
- shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions testdata/milestone/normal/data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
event_name: milestone

0 comments on commit 3b4e18b

Please sign in to comment.