ci: add memogen workflow

Closes #6734.

Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
Dwi Siswanto
2025-12-26 01:10:30 +07:00
parent 78e90e300d
commit 4bf4829b68

30
.github/workflows/memogen.yaml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: 💾 Memoize Functions
on:
push:
branches:
- dev
paths:
- 'pkg/js/libs/**'
- 'cmd/memogen/**'
workflow_dispatch: {}
jobs:
memogen:
if: ${{ !endsWith(github.actor, '[bot]') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/setup/git@v1
- run: make memogen
- run: git status -s | wc -l | xargs -I {} echo CHANGES={} >> $GITHUB_OUTPUT
id: status
- uses: projectdiscovery/actions/commit@v1
if: steps.status.outputs.CHANGES > 0
with:
files: |
pkg/js/libs/
message: 'chore(js): update memoized functions 🤖'
- run: git push origin $GITHUB_REF
if: steps.status.outputs.CHANGES > 0