Skip to content

Add delete command and delete test issues (upstream) (#10) #5

Add delete command and delete test issues (upstream) (#10)

Add delete command and delete test issues (upstream) (#10) #5

Workflow file for this run

name: 'Generate JavaScript code and open pull request with it'
on:
push:
branches-ignore:
- 'renovate/*'
- 'github-actions/generate-js/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2
with:
version: 8.x.x
- name: Setup node
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
with:
node-version: 20
cache: pnpm
- run: pnpm install
- run: pnpm run prepare
- name: Get word diff to see changes in dist folder
id: diff
run: |
if ! git diff --quiet dist
then
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "GIT_DIFF<<$EOF" >> $GITHUB_OUTPUT
git diff --word-diff=porcelain --word-diff-regex=. dist | grep '^[+-]' >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
fi
- name: Create pull request with generated JavaScript
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5
with:
add-paths: dist/
commit-message: Generate JavaScript based on ${{ github.sha }}
author: GitHub <noreply@github.com>
branch: github-actions/generate-js/${{ github.ref_name }}
title: Generate JavaScript for branch `${{ github.ref_name }}`
body: |
This pull request is opened automatically and contains generated JavaScript code based on commit ${{ github.sha }}.