From 8c73ee111f4510494345575934880613edefb94d Mon Sep 17 00:00:00 2001 From: Zaran Lalvani Date: Thu, 16 May 2024 16:57:01 -0400 Subject: [PATCH] test-project action --- .github/workflows/bumpgen-core.yml | 12 ++++----- .github/workflows/bumpgen-test-project.yml | 31 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/bumpgen-test-project.yml diff --git a/.github/workflows/bumpgen-core.yml b/.github/workflows/bumpgen-core.yml index 2e16132..1a5c97a 100644 --- a/.github/workflows/bumpgen-core.yml +++ b/.github/workflows/bumpgen-core.yml @@ -1,25 +1,25 @@ -name: "Bumpgen (core)" +name: "Bumpgen" on: pull_request: + paths: + - "packages/bumpgen-core/**" types: - opened + - synchronize - labeled + - unlabeled permissions: pull-requests: read + contents: write jobs: main: name: Run Bumpgen runs-on: ubuntu-latest - # Need to run on all commits on PRs opened by dependabot except those committed by bumpgen - # This might not work if: ${{ (github.event.pull_request.user.login == 'dependabot[bot]' || contains( github.event.pull_request.labels.*.name, 'run bumpgen')) && github.event.pull_request.commits[0].author.username != 'github-actions[bot]'}} - # if: ${{ github.actor == 'dependabot[bot]' || contains( github.event.pull_request.labels.*.name, 'run bumpgen') }} steps: - - name: Print github obj - run: echo '${{ toJson(github) }}' - uses: actions/checkout@v4 - name: Setup uses: ./tooling/github/setup diff --git a/.github/workflows/bumpgen-test-project.yml b/.github/workflows/bumpgen-test-project.yml new file mode 100644 index 0000000..f46b23e --- /dev/null +++ b/.github/workflows/bumpgen-test-project.yml @@ -0,0 +1,31 @@ +name: "Bumpgen" + +on: + pull_request: + paths: + - "packages/test-project/**" + types: + - opened + - synchronize + - labeled + - unlabeled + +permissions: + pull-requests: read + contents: write + +jobs: + main: + name: Run Bumpgen + runs-on: ubuntu-latest + if: ${{ (github.event.pull_request.user.login == 'dependabot[bot]' || contains( github.event.pull_request.labels.*.name, 'run bumpgen')) && github.event.pull_request.commits[0].author.username != 'github-actions[bot]'}} + steps: + - uses: actions/checkout@v4 + - name: Setup + uses: ./tooling/github/setup + - name: Bumpgen + uses: ./ + with: + path: "./packages/test-project/" + llm_key: ${{ secrets.LLM_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }}