Skip to content

Commit 7b59ac0

Browse files
authored
Add dummy workflow to test workflow_run trigger (DataDog#21357)
* test * test * wf run id * change wf * change wf * wf * sha * other commit * other commit
1 parent d2fb4c0 commit 7b59ac0

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

.github/workflows/testing-run-on-wf-run.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,11 @@ jobs:
2222
- name: Define SHA
2323
id: define_sha
2424
run: |
25-
# Determine if the triggering event was a push or a pull request
26-
27-
if [[ "${{ github.event.workflow_run.event }}" == "push" ]]; then
28-
echo "Triggered by push"
29-
echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT
30-
elif [[ "${{ github.event.workflow_run.event }}" == "pull_request" ]]; then
31-
echo "Triggered by pull_request"
32-
echo "sha=${{ github.event.workflow_run.event.head.sha }}" >> $GITHUB_OUTPUT
33-
34-
else
35-
echo "Triggered by unknown event: ${{ github.event.workflow_run.event }}"
36-
echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT
37-
fi
25+
echo "sha=${{ github.event.workflow_run.head_sha }}" >> $GITHUB_OUTPUT
3826
- name: Get run ID
3927
run: |
40-
4128
echo "run_id_variable=${{ github.event.workflow_run.id }}"
4229
run_id=$(gh run list --workflow ".github/workflows/resolve-build-deps.yaml" -c ${{ steps.define_sha.outputs.sha }} --json databaseId --jq '.[-1].databaseId')
4330
echo "run_id_list=$run_id"
44-
4531
env:
4632
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)