Domain Content Resolver -> Master #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Actions that only run when opening or updating pull requests | |
name: Pull Requests | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
branches: | |
- master | |
jobs: | |
add-labels-based-on-whats-changed: | |
name: Add PR labels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
mobile: | |
- 'packages/app-mobile/**' | |
extension: | |
- 'packages/app-extension/**' | |
xnft: | |
- 'packages/xnft-cli/**' | |
backend: | |
- 'backend/**' | |
- if: steps.changes.outputs.mobile == 'true' | |
uses: andymckay/[email protected] | |
with: | |
add-labels: "mobile" | |
- if: steps.changes.outputs.extension == 'true' | |
uses: andymckay/[email protected] | |
with: | |
add-labels: "extension" | |
- if: steps.changes.outputs.xnft == 'true' | |
uses: andymckay/[email protected] | |
with: | |
add-labels: "xnft" | |
- if: steps.changes.outputs.backend == 'true' | |
uses: andymckay/[email protected] | |
with: | |
add-labels: "backend" | |
yarn-lock-changes: | |
name: yarn.lock changes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: simek/yarn-lock-changes@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
hasura-change-summary: | |
name: Hasura metadata change summary | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Fieldguide/action-hasura-change-summary@v2 | |
id: hasura-change | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
project_dir: ./backend/reef/hasura | |
# if there are changes, create or overwrite comment | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
if: ${{ steps.hasura-change.outputs.change_html }} | |
with: | |
header: hasura-change-summary | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
message: ${{ steps.hasura-change.outputs.change_html }} | |
# if there are no changes, delete the comment if it exists | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
if: ${{ !steps.hasura-change.outputs.change_html }} | |
with: | |
header: hasura-change-summary | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
delete: true |