Skip to content

Update oembed submodule #10

Update oembed submodule

Update oembed submodule #10

name: Update oembed submodule
on:
schedule:
- cron: "0 9 * * 1" # 毎週月曜 9:00 UTC
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-submodule:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Update oembed submodule
run: git submodule update --remote oembed
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Regenerate oEmbed proxy providers
run: dotnet run --project MoEmbed.CodeGeneration
- name: Check for changes
id: check
run: |
if git diff --quiet; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Build
if: steps.check.outputs.changed == 'true'
run: dotnet restore --locked-mode && dotnet build
- name: Core Test
if: steps.check.outputs.changed == 'true'
run: dotnet run --project MoEmbed.Core.Tests
- name: Models Test
if: steps.check.outputs.changed == 'true'
run: dotnet run --project MoEmbed.Models.Tests
- name: Create Pull Request
if: steps.check.outputs.changed == 'true'
id: create-pr
uses: peter-evans/create-pull-request@v7
with:
branch: automated/update-oembed-submodule
commit-message: "Update oembed submodule"
title: "Update oembed submodule"
body: |
Automated update of the `oembed` submodule to the latest commit and regeneration of oEmbed proxy providers.
delete-branch: true
- name: Merge Pull Request
if: steps.create-pr.outputs.pull-request-operation == 'created' || steps.create-pr.outputs.pull-request-operation == 'updated'
run: gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} --squash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}