Skip to content

Commit 078b4d5

Browse files
committed
CI - using github.event.pull_request.head.ref for workflow dispatch.
1 parent f80940c commit 078b4d5

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

.github/workflows/build-vscode-extension.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
with:
3131
node-version: 15.6.0
3232
check-latest: true
33-
# - run: sleep 30
33+
- name: Dump context
34+
uses: crazy-max/ghaction-dump-context@v1
3435
- run: echo "trying to download whalelint-${{ github.sha }} ${{ runner.os }} ..."
3536
- name: Download WhaleLint binary
3637
if: ${{ github.event.pr }} || ${{ github.event.pr_merge }}

.github/workflows/build.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,11 @@ jobs:
8686
steps:
8787
- name: Dump context
8888
uses: crazy-max/ghaction-dump-context@v1
89-
- name: push or pr
90-
id: event_type
91-
run: |
92-
if [[ "${{ github.event_name }}" == "push" ]]; then
93-
echo "::set-output name=ref::${{ github.ref }}"
94-
else
95-
echo "::set-output name=ref::refs/pull/${{ github.event.pull_request.number }}/merge"
96-
fi
9789
- name: Trigger VSCode extension build workflow
9890
uses: benc-uk/workflow-dispatch@v1
9991
with:
10092
workflow: build-vscode-extension
101-
ref: ${{ steps.event_type.outputs.ref }}
93+
ref: ${{ github.head.ref }}
10294
token: ${{ secrets.WHALELINT_WORKFLOW }}
10395
inputs: '{ "event_type": "push_to_main", "debug": "true" }'
10496

@@ -112,6 +104,6 @@ jobs:
112104
uses: benc-uk/workflow-dispatch@v1
113105
with:
114106
workflow: build-jetbrains-plugin
115-
# ref: ${{ github.event.pull_request.head.ref }}
107+
ref: ${{ github.event.pull_request.head.ref }}
116108
token: ${{ secrets.WHALELINT_WORKFLOW }}
117109
inputs: '{ "event_type": "push_to_main", "debug": "true" }'

0 commit comments

Comments
 (0)