Skip to content

Commit aafb85a

Browse files
authored
fix(pipeline): steps skipped (#118)
* fix(pipeline): steps skipped * Update default.yml * Update pull-request-opened.yml * Update pull-request.yml * Update default.yml * Update default.yml * Update pull-request-opened.yml * Update pull-request.yml * Update default.yml * Update default.yml * Update default.yml
1 parent 2bc1c1c commit aafb85a

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
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:
@@ -36,5 +36,5 @@ jobs:
3636

3737
deploy:
3838
uses: ./.github/workflows/02-deploy-gh-pages.yml
39-
if: ${{ github.actor != 'dependabot[bot]' && github.owner == 'db-ui' }}
39+
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui' }}
4040
needs: [lint, test, 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)