Skip to content

Commit b0d5e46

Browse files
mfranzkenmerget
andauthored
fix(pipeline): steps skipped (#101)
* fix(pipeline): steps skipped Co-authored-by: NicolasMerget <[email protected]>
1 parent 54a219c commit b0d5e46

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

.github/workflows/02-deploy-gh-pages.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,22 @@ jobs:
3232
name: patternlab
3333
path: out
3434

35+
- name: ↔ Extract branch name
36+
uses: ./.github/actions/extract-branch
37+
id: extract_branch
38+
3539
- name: ↔ Extract branch/tag name
3640
shell: bash
3741
env:
3842
RELEASE: ${{ inputs.release }}
3943
PRE_RELEASE: ${{ inputs.preRelease }}
44+
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch-name }}
4045
run: |
4146
if [[ $RELEASE == "true" || $PRE_RELEASE == "true" ]]
4247
then
4348
echo "##[set-output name=name;]$(echo ${GITHUB_REF#refs/tags/})"
4449
else
45-
echo "##[set-output name=name;]$(echo ${GITHUB_REF#refs/heads/})"
50+
echo "##[set-output name=name;]$(echo $BRANCH_NAME)"
4651
fi
4752
id: extract
4853

.github/workflows/default.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- 'main'
8-
- 'dbux-3'
7+
- "main"
8+
- "dbux-3"
99

1010
jobs:
1111
init:
1212
uses: ./.github/workflows/00-init.yml
1313

1414
scan-secrets:
15-
if: github.owner == 'db-ui'
15+
if: github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui'
1616
uses: ./.github/workflows/00-scan-secrets.yml
1717

1818
lint:
@@ -27,7 +27,7 @@ jobs:
2727
build:
2828
uses: ./.github/workflows/01-build.yml
2929
needs: [init]
30-
30+
3131
checks-done:
3232
runs-on: ubuntu-latest
3333
steps:
@@ -37,5 +37,5 @@ jobs:
3737

3838
deploy:
3939
uses: ./.github/workflows/02-deploy-gh-pages.yml
40-
if: ${{ github.actor != 'dependabot[bot]' && github.owner == 'db-ui' }}
40+
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui' }}
4141
needs: [lint, build]

.github/workflows/pull-request-opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ permissions:
1111

1212
jobs:
1313
add-url-comment:
14-
if: github.owner == 'db-ui'
14+
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
1515
uses: ./.github/workflows/99-add-url-comment.yml

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
uses: ./.github/workflows/99-dependency-review.yml
2323

2424
labeler:
25-
if: github.owner == 'db-ui'
25+
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
2626
uses: ./.github/workflows/99-labeler.yml

0 commit comments

Comments
 (0)