File tree Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : " Extract branch name"
3+ description : " Extract branch name based on pr or push"
4+ outputs :
5+ branch-name :
6+ description : " Branch name"
7+ value : ${{ steps.branch-name.outputs.branch-name }}
8+ runs :
9+ using : " composite"
10+ steps :
11+ - name : ⏬ Get branch name
12+ uses : actions/github-script@v6
13+ id : get-branch-name
14+ with :
15+ result-encoding : string
16+ script : |
17+ return (
18+ context?.payload?.pull_request?.head?.ref ||
19+ context?.payload?.ref
20+ ).replace("refs/heads/","");
21+ - name : 🪑 Set output
22+ id : branch-name
23+ run : echo "::set-output name=branch-name::$(echo $BRANCH_NAME)"
24+ shell : bash
25+ env :
26+ BRANCH_NAME : ${{steps.get-branch-name.outputs.result}}
Original file line number Diff line number Diff line change 1616
1717
1818echo " 📥 Get gh-pages tar"
19- curl -L https://github.com/db-ui/core /tarball/gh-pages --output gh-pages
19+ curl -L https://github.com/" $OWNER_NAME " / " $REPO_NAME " /tarball/gh-pages --output gh-pages
2020
2121echo " 📦 Unpack Tar"
2222if [[ $RELEASE == " true" ]]; then
Original file line number Diff line number Diff line change @@ -13,15 +13,14 @@ jobs:
1313 fetch-depth : 0
1414
1515 - name : ↔ Extract branch name
16- shell : bash
17- run : echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
16+ uses : ./.github/actions/extract-branch
1817 id : extract_branch
1918
2019 - name : 🐷 TruffleHog OSS
2120 uses :
trufflesecurity/[email protected] 2221 with :
2322 path : ./
24- base : ${{ steps.extract_branch.outputs.branch }}
23+ base : ${{ steps.extract_branch.outputs.branch-name }}
2524 head : HEAD
2625
2726 - name : 💀 Killing me softly
You can’t perform that action at this time.
0 commit comments