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 16
16
17
17
18
18
echo " 📥 Get gh-pages tar"
19
- curl -L https://github.com/db-ui/base /tarball/gh-pages --output gh-pages
19
+ curl -L https://github.com/" $OWNER_NAME " / " $REPO_NAME " /tarball/gh-pages --output gh-pages
20
20
21
21
echo " 📦 Unpack Tar"
22
22
if [[ $RELEASE == " true" ]]; then
Original file line number Diff line number Diff line change @@ -13,15 +13,14 @@ jobs:
13
13
fetch-depth : 0
14
14
15
15
- 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
18
17
id : extract_branch
19
18
20
19
- name : 🐷 TruffleHog OSS
21
20
uses :
trufflesecurity/[email protected]
22
21
with :
23
22
path : ./
24
- base : ${{ steps.extract_branch.outputs.branch }}
23
+ base : ${{ steps.extract_branch.outputs.branch-name }}
25
24
head : HEAD
26
25
27
26
- name : 💀 Killing me softly
You can’t perform that action at this time.
0 commit comments