From d743981fc24f8d6f451c940f2b896b9ddb9e2ae9 Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Sun, 8 Sep 2024 18:20:34 +0300 Subject: [PATCH] up workflow files: new commands --- .github/workflows/ci.yml | 2 +- .github/workflows/fix-lint.yml | 23 +++++++++++++++++++++++ .github/workflows/merge-next.yml | 24 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/fix-lint.yml create mode 100644 .github/workflows/merge-next.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1882914..3649e89e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,6 @@ jobs: name: cypress-images path: cypress/integration/__image_snapshots__/ - run: node scripts/outdatedGitPackages.mjs - if: github.ref == 'refs/heads/next' + if: ${{ github.ref == 'refs/heads/next' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/fix-lint.yml b/.github/workflows/fix-lint.yml new file mode 100644 index 00000000..990de3fa --- /dev/null +++ b/.github/workflows/fix-lint.yml @@ -0,0 +1,23 @@ +name: Fix Lint Command +on: + issue_comment: + types: [created] +jobs: + deploy: + runs-on: ubuntu-latest + if: >- + github.event.issue.pull_request != '' && + ( + contains(github.event.comment.body, '/fix') + ) + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v2 + with: + ref: refs/pull/${{ github.event.issue.number }}/head + - run: pnpm lint --fix + - name: Push Changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/merge-next.yml b/.github/workflows/merge-next.yml new file mode 100644 index 00000000..c7a66454 --- /dev/null +++ b/.github/workflows/merge-next.yml @@ -0,0 +1,24 @@ +name: Update Base Branch Command +on: + issue_comment: + types: [created] +jobs: + deploy: + runs-on: ubuntu-latest + if: >- + github.event.issue.pull_request != '' && + ( + contains(github.event.comment.body, '/update') + ) + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v2 + with: + ref: refs/pull/${{ github.event.issue.number }}/head + - name: Merge From Next + run: git merge next --strategy-option=theirs + - name: Push Changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }}