From 61d6e627d3aaea9ba436535864a314b5566a134c Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 26 Oct 2022 10:04:36 +0200 Subject: [PATCH 1/3] chore: updated dependency (#119) --- .github/workflows/00-scan-secrets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/00-scan-secrets.yml b/.github/workflows/00-scan-secrets.yml index 725e6a1dfe..b2d32bc892 100644 --- a/.github/workflows/00-scan-secrets.yml +++ b/.github/workflows/00-scan-secrets.yml @@ -18,7 +18,7 @@ jobs: id: extract_branch - name: 🐷 TruffleHog OSS - uses: trufflesecurity/trufflehog@v3.15.0 + uses: trufflesecurity/trufflehog@v3.15.1 with: path: ./ base: ${{ steps.extract_branch.outputs.branch }} From e899624de3adb8223f846493140596a305dc6408 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 26 Oct 2022 10:11:38 +0200 Subject: [PATCH 2/3] refactor: adapted pipeline script parts (#120) from https://github.com/db-ui/elements/commit/d07fae26170427ed683828bbba146309de425dcb --- .github/actions/extract-branch/action.yml | 26 +++++++++++++++++++++++ .github/scripts/build-gh-page.sh | 2 +- .github/workflows/00-scan-secrets.yml | 5 ++--- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .github/actions/extract-branch/action.yml diff --git a/.github/actions/extract-branch/action.yml b/.github/actions/extract-branch/action.yml new file mode 100644 index 0000000000..4c9aea311f --- /dev/null +++ b/.github/actions/extract-branch/action.yml @@ -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}} diff --git a/.github/scripts/build-gh-page.sh b/.github/scripts/build-gh-page.sh index f99188cee8..41eae1f16d 100644 --- a/.github/scripts/build-gh-page.sh +++ b/.github/scripts/build-gh-page.sh @@ -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 diff --git a/.github/workflows/00-scan-secrets.yml b/.github/workflows/00-scan-secrets.yml index b2d32bc892..d3e6674c61 100644 --- a/.github/workflows/00-scan-secrets.yml +++ b/.github/workflows/00-scan-secrets.yml @@ -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 From 320bcf7cf8cd5f4673aebdfbc3cc8e475362682e Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 26 Oct 2022 15:25:04 +0200 Subject: [PATCH 3/3] fix(pipeline): deploy step (#121) --- .github/scripts/build-gh-page.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/build-gh-page.sh b/.github/scripts/build-gh-page.sh index 41eae1f16d..f99188cee8 100644 --- a/.github/scripts/build-gh-page.sh +++ b/.github/scripts/build-gh-page.sh @@ -16,7 +16,7 @@ fi echo "📥 Get gh-pages tar" -curl -L https://github.com/"$OWNER_NAME"/"$REPO_NAME"/tarball/gh-pages --output gh-pages +curl -L https://github.com/db-ui/core/tarball/gh-pages --output gh-pages echo "📦 Unpack Tar" if [[ $RELEASE == "true" ]]; then