Skip to content

Commit

Permalink
wip: marketplace action
Browse files Browse the repository at this point in the history
  • Loading branch information
zlalvani committed May 11, 2024
1 parent 86d1f8b commit d992d7a
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/bumpgen-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Bumpgen (core)"

on:
pull_request:
types:
- opened

permissions:
pull-requests: read

jobs:
main:
name: Run Bumpgen
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Setup
uses: ./tooling/github/setup
- name: Bumpgen
uses: action.yml
with:
path: "./packages/core/"
llm_key: ${{ secrets.LLM_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "bumpgen"
description: "handle breaking changes from dependency upgrades"
author: Xeol <xeol.io>

inputs:
path:
description: Repository path
required: false
default: "./"
llm_key:
description: "LLM API key"
required: true
github_token:
description: "GitHub token"
required: true

runs:
using: "composite"
steps:
- shell: bash
env:
LLM_API_KEY: ${{ inputs.llm_key }}
run: |
npm install -g bumpgen
bumpgen --simple --dir ${{ inputs.path }} --no-upgrade --auto-detect
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Check for changes and commit
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
run: |
git add -A
if ! git diff-index --quiet HEAD; then
git commit -m "chore: run bumpgen"
git push origin HEAD:${GITHUB_REF#refs/heads/}
else
echo "No changes to commit"
fi

0 comments on commit d992d7a

Please sign in to comment.