mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 21:33:06 +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
|
fail_ci_if_error: true
|
||||||
|
|
||||||
- name: Run Basic Test Results Action
|
- name: Run Basic Test Results Action
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||||
uses: codecov/basic-test-results@v1
|
uses: codecov/basic-test-results@v1
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
|
|
||||||
# TODO: Download release asset action with cache
|
# TODO: Download release asset action with cache
|
||||||
- name: Download latest released Sablier binary
|
- name: Download latest released Sablier binary
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||||
id: latest-release
|
id: latest-release
|
||||||
run: |
|
run: |
|
||||||
release_data=$(curl -s https://api.github.com/repos/sablierapp/sablier/releases/latest)
|
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
|
echo "artifact_path=sablier_${version}_linux-amd64" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Compare the downloaded binary with the built binary
|
- name: Compare the downloaded binary with the built binary
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||||
id: diff
|
id: diff
|
||||||
run: |
|
run: |
|
||||||
go tool gsa -o diff.txt ${{ steps.latest-release.outputs.artifact_path }} sablier_draft_linux-amd64
|
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
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Comment diff on pull request
|
- name: Comment diff on pull request
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||||
uses: thollander/actions-comment-pull-request@v3
|
uses: thollander/actions-comment-pull-request@v3
|
||||||
with:
|
with:
|
||||||
message: |
|
message: |
|
||||||
|
|||||||
Reference in New Issue
Block a user