Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA: Submodules Update && Generate-Font #538

Merged
merged 7 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
version: 2

updates:
- directory: /
package-ecosystem: gitsubmodule
schedule:
interval: "daily"

- directory: /
package-ecosystem: "npm"
schedule:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/submodule-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: submodule/font auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: "${{github.actor == 'd2ai-bot' && github.event.pull_request.title == 'submodule update: generate-font'}}"
steps:
- name: Enable auto-merge for submodule updates
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
56 changes: 56 additions & 0 deletions .github/workflows/submodule-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Update submodules
on:
workflow_dispatch:
schedule:
- cron: '0 18 * * *'

jobs:
update_submodules:
name: Update submodules
runs-on: ubuntu-latest
steps:
- name: Checkout D2AI
uses: actions/checkout@v4
with:
submodules: recursive

- uses: pnpm/action-setup@v2

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: pnpm

- name: Update submodules
run: git submodule update --remote --recursive

- name: porcelain check
uses: dorny/paths-filter@v2
id: data
with:
base: HEAD
filters: |
changed:
- '**'

- name: pnpm generate-font
if: steps.data.outputs.changed == 'true'
run: |
pnpm install --frozen-lockfile --prefer-offline
pnpm generate-font

- name: Create Pull Request
if: steps.data.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
commit-message: submodule update
committer: D2AI Bot <destinyitemmanager@gmail.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: 'submodule update: generate-font'
body: |
Submodule Update
generate-font

branch: submodule-update-v${{ github.event.client_payload.config.env.MANIFEST_VERSION }}