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 eda1062
Showing 1 changed file with 5 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

0 comments on commit eda1062

Please sign in to comment.