Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/actions/extract-branch/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: "Extract branch name"
description: "Extract branch name based on pr or push"
outputs:
branch-name:
description: "Branch name"
value: ${{ steps.branch-name.outputs.branch-name }}
runs:
using: "composite"
steps:
- name: ⏬ Get branch name
uses: actions/github-script@v6
id: get-branch-name
with:
result-encoding: string
script: |
return (
context?.payload?.pull_request?.head?.ref ||
context?.payload?.ref
).replace("refs/heads/","");
- name: 🪑 Set output
id: branch-name
run: echo "::set-output name=branch-name::$(echo $BRANCH_NAME)"
shell: bash
env:
BRANCH_NAME: ${{steps.get-branch-name.outputs.result}}
2 changes: 1 addition & 1 deletion .github/scripts/build-gh-page.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi


echo "📥 Get gh-pages tar"
curl -L https://github.com/db-ui/core/tarball/gh-pages --output gh-pages
curl -L https://github.com/"$OWNER_NAME"/"$REPO_NAME"/tarball/gh-pages --output gh-pages

echo "📦 Unpack Tar"
if [[ $RELEASE == "true" ]]; then
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/00-scan-secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ jobs:
fetch-depth: 0

- name: ↔ Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
uses: ./.github/actions/extract-branch
id: extract_branch

- name: 🐷 TruffleHog OSS
uses: trufflesecurity/trufflehog@v3.15.1
with:
path: ./
base: ${{ steps.extract_branch.outputs.branch }}
base: ${{ steps.extract_branch.outputs.branch-name }}
head: HEAD

- name: 💀 Killing me softly
Expand Down