From 1a3998cda617fd589f48e7122ce42edd9a6d72f9 Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Wed, 19 Jan 2022 23:33:06 +0100 Subject: [PATCH] add action-build for dependabot updates (#1036) --- .github/workflows/action-build.yml | 41 ++++++++++++++++++++++++++++++ .github/workflows/rebase.yml | 26 ------------------- .github/workflows/release.yml | 4 +++ .github/workflows/tests.yml | 3 +++ 4 files changed, 48 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/action-build.yml delete mode 100644 .github/workflows/rebase.yml diff --git a/.github/workflows/action-build.yml b/.github/workflows/action-build.yml new file mode 100644 index 000000000..59a20735b --- /dev/null +++ b/.github/workflows/action-build.yml @@ -0,0 +1,41 @@ +name: Dependabot post-update +on: + pull_request_target: + types: [opened, synchronize, reopened] + branches: + - 'master' + +env: + HUSKY: '0' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + post-update: + if: ${{ github.actor == 'dependabot[bot]' }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Checkout out pull request + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr checkout ${{ github.event.pull_request.number }} + + - uses: actions/setup-node@v2 + with: + node-version: '16' + cache: 'yarn' + + - run: yarn install --frozen-lockfile + + - run: yarn build + + - name: Commit and push if needed + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply dist/index.js changes diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml deleted file mode 100644 index 5d840114d..000000000 --- a/.github/workflows/rebase.yml +++ /dev/null @@ -1,26 +0,0 @@ -on: - issue_comment: - types: - - created -name: Automatic Rebase -jobs: - rebase: - name: Rebase - runs-on: ubuntu-latest - steps: - - uses: khan/pull-request-comment-trigger@master - id: check - with: - trigger: '/rebase' - reaction: rocket - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - - uses: actions/checkout@v2 - if: steps.check.outputs.triggered == 'true' - with: - fetch-depth: 0 - - name: Automatic Rebase - uses: cirrus-actions/rebase@1.5 - if: steps.check.outputs.triggered == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0aef601ec..4da2121c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,10 @@ on: push: tags: - v*.*.* + +env: + HUSKY: '0' + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 24b8b0c57..98e1ac48e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,9 @@ on: - master pull_request: +env: + HUSKY: '0' + jobs: build: runs-on: ubuntu-latest