mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 13:23:03 +01:00
ci: add pull request filter (#631)
Certains steps should be executed within the context of a pull request only.
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
||||
fail_ci_if_error: true
|
||||
|
||||
- name: Run Basic Test Results Action
|
||||
if: ${{ !cancelled() }}
|
||||
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||
uses: codecov/basic-test-results@v1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
|
||||
# TODO: Download release asset action with cache
|
||||
- name: Download latest released Sablier binary
|
||||
if: ${{ !cancelled() }}
|
||||
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||
id: latest-release
|
||||
run: |
|
||||
release_data=$(curl -s https://api.github.com/repos/sablierapp/sablier/releases/latest)
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
echo "artifact_path=sablier_${version}_linux-amd64" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Compare the downloaded binary with the built binary
|
||||
if: ${{ !cancelled() }}
|
||||
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||
id: diff
|
||||
run: |
|
||||
go tool gsa -o diff.txt ${{ steps.latest-release.outputs.artifact_path }} sablier_draft_linux-amd64
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Comment diff on pull request
|
||||
if: ${{ !cancelled() }}
|
||||
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||
uses: thollander/actions-comment-pull-request@v3
|
||||
with:
|
||||
message: |
|
||||
|
||||
Reference in New Issue
Block a user