mirror of
https://github.com/dkershner6/post-api-call-action.git
synced 2024-11-15 15:03:51 +08:00
95 lines
2.9 KiB
YAML
Generated
95 lines
2.9 KiB
YAML
Generated
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
|
|
|
|
name: upgrade-main
|
|
on:
|
|
workflow_dispatch: {}
|
|
schedule:
|
|
- cron: 0 0 * * *
|
|
jobs:
|
|
upgrade:
|
|
name: Upgrade
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
patch_created: ${{ steps.create_patch.outputs.patch_created }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: main
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v2.2.4
|
|
with:
|
|
version: "8"
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20.10.0
|
|
- name: Install dependencies
|
|
run: pnpm i --frozen-lockfile
|
|
- name: Upgrade dependencies
|
|
run: npx projen upgrade
|
|
- name: Find mutations
|
|
id: create_patch
|
|
run: |-
|
|
git add .
|
|
git diff --staged --patch --exit-code > .repo.patch || echo "patch_created=true" >> $GITHUB_OUTPUT
|
|
- name: Upload patch
|
|
if: steps.create_patch.outputs.patch_created
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: .repo.patch
|
|
path: .repo.patch
|
|
pr:
|
|
name: Create Pull Request
|
|
needs: upgrade
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
if: ${{ needs.upgrade.outputs.patch_created }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: main
|
|
- name: Download patch
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: .repo.patch
|
|
path: ${{ runner.temp }}
|
|
- name: Apply patch
|
|
run: '[ -s ${{ runner.temp }}/.repo.patch ] && git apply ${{ runner.temp }}/.repo.patch || echo "Empty patch. Skipping."'
|
|
- name: Set git identity
|
|
run: |-
|
|
git config user.name "github-actions"
|
|
git config user.email "github-actions@github.com"
|
|
- name: Create Pull Request
|
|
id: create-pr
|
|
uses: peter-evans/create-pull-request@v4
|
|
with:
|
|
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
|
|
commit-message: |-
|
|
chore(deps): upgrade dependencies
|
|
|
|
Upgrades project dependencies. See details in [workflow run].
|
|
|
|
[Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
|
|
------
|
|
|
|
*Automatically created by projen via the "upgrade-main" workflow*
|
|
branch: github-actions/upgrade-main
|
|
title: "chore(deps): upgrade dependencies"
|
|
body: |-
|
|
Upgrades project dependencies. See details in [workflow run].
|
|
|
|
[Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
|
|
------
|
|
|
|
*Automatically created by projen via the "upgrade-main" workflow*
|
|
author: github-actions <github-actions@github.com>
|
|
committer: github-actions <github-actions@github.com>
|
|
signoff: true
|