Skip to content

Commit

Permalink
skip steps when pr opened by gh bot
Browse files Browse the repository at this point in the history
  • Loading branch information
jcortejoso authored Oct 13, 2023
1 parent 7e9f951 commit 33a570e
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/social-connect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:

jobs:
install-dependencies:
name: Install + Build +
name: Install + Build
outputs:
package-json-checksum: ${{ steps.node-checksums.outputs.PACKAGE_JSON_CHECKSUM }}
# Propagate more outputs if you need https://github.com/tj-actions/changed-files#outputs
Expand All @@ -61,6 +61,15 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Detect files changed in PR, and expose as output
id: changed-files
uses: tj-actions/changed-files@v39
with:
# Using comma as separator to be able to easily match full paths (using ,<path>)
separator: ','
# Checking if changed in the last 100 commits in PRs
fetch_depth: '100'
- run: echo ",${{ steps.changed-files.outputs.all_modified_files }}"
- name: Verify setup for incremental testing
run: |
set -euo pipefail
Expand Down Expand Up @@ -146,23 +155,22 @@ jobs:
package-json-checksum: ${{ needs.install-dependencies.outputs.package-json-checksum }}
- run: yarn run prettify:diff
- run: yarn run lint
- name: Detect files changed in PR, and expose as output
id: changed-files
uses: tj-actions/changed-files@v37
with:
# Using comma as separator to be able to easily match full paths (using ,<path>)
separator: ','
# Checking if changed in the last 100 commits in PRs
fetch_depth: '150'
- run: echo ",${{ steps.changed-files.outputs.all_modified_files }}"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: Find ChangeSet in PR
uses: peter-evans/find-comment@v2
id: fc
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'github-action'
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Changeset detected
comment-author: changeset-bot[bot]
- run: |
- name: Fail if Changeset commit not found
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'github-action'
run: |
if ${{ steps.fc.outputs.comment-id == 0 }}; then
echo "No Changeset Found" && exit 1
else
Expand Down

0 comments on commit 33a570e

Please sign in to comment.