Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document advanced usage with Merge Queue #2

Open
aldenquimby opened this issue May 22, 2023 · 0 comments
Open

Document advanced usage with Merge Queue #2

aldenquimby opened this issue May 22, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@aldenquimby
Copy link

aldenquimby commented May 22, 2023

Github's new merge queue does not set $GITHUB_BASE_REF or $GITHUB_HEAD_REF, so the example Find modified migrations does not work

The best I've found is to use dorny/paths-filter like this:

name: Lint Migrations

on:
  pull_request:
  merge_group:

jobs:
  lint_migrations:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      # Works on Pull Request and Merge Queue
      - name: Find modified migrations
        uses: dorny/paths-filter@4067d885736b84de7c414f582ac45897079b0a78
        id: modified-migrations
        with:
          base: ${{ github.event.merge_group.base_ref}}
          ref: ${{ github.event.merge_group.head_ref }}
          list-files: shell
          filters: |
            migrations:
              - migrations/**/*.sql
      - uses: sbdchd/squawk-action@v1
        with:
          pattern: ${{ steps.modified-migrations.outputs.migrations_files }}
@sbdchd sbdchd added documentation Improvements or additions to documentation enhancement New feature or request labels May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants