Skip to content
Closed
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
78 changes: 78 additions & 0 deletions .github/workflows/check-smp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Update data
on:
push:
schedule:
- cron: '0 5 * * 6'
workflow_dispatch: #

env:
submodule_owner: ShiftMediaProject
submodule_folder: SMP

jobs:
check_smp:
runs-on: ubuntu-latest
strategy:
matrix:
submodule:
- fontconfig
- freetype2
- fribidi
- harfbuzz
- libass
- libiconv
- liblzma
- libxml2
- zlib
steps:
- uses: actions/checkout@v2
- name: Set submodule current
run: |
git submodule update --init --recursive "${{ env.submodule_folder }}/${{ matrix.submodule }}"
cd ${{ env.submodule_folder }}/${{ matrix.submodule }}
echo SUBMODULE_NAME=${{ matrix.submodule }} >> $GITHUB_ENV
echo SUBMODULE_REV=$(git describe --tags --first-parent --abbrev=7 --long --dirty) >> $GITHUB_ENV
echo SUBMODULE_SHA=$(git rev-parse HEAD) >> $GITHUB_ENV
- name: Get submodule current remote
id: current
uses: cardinalby/git-get-release-action@1.2.2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repo: ${{ env.submodule_owner }}/${{ matrix.submodule }}
commitSha: ${{ env.SUBMODULE_SHA }}
doNotFailIfNotFound: true
- name: Get submodule latest remote
id: latest
uses: cardinalby/git-get-release-action@1.2.2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repo: ${{ env.submodule_owner }}/${{ matrix.submodule }}
latest: true
prerelease: false
doNotFailIfNotFound: true
- name: Set submodule current remote
if: steps.current.outputs.tag_name != ''
run: echo SUBMODULE_REV=${{ steps.current.outputs.tag_name }} >> $GITHUB_ENV
- name: Check if need update
if: |
steps.current.outputs.tag_name == '' ||
steps.latest.outputs.tag_name != '' &&
steps.current.outputs.tag_name != steps.latest.outputs.tag_name
run: |
cd ${{ env.submodule_folder }}/${{ matrix.submodule }}
git checkout ${{ steps.latest.outputs.tag_name }}
echo NEED_UPDATE=1 >> $GITHUB_ENV
- name: Run update
if: ${{ env.NEED_UPDATE }} == '1'
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update ${{ matrix.submodule }} to ${{ steps.latest.outputs.tag_name }}
branch: submodule-${{ matrix.submodule }}-${{ steps.latest.outputs.tag_name }}
branch-suffix: short-commit-hash
delete-branch: true
title: Update ${{ matrix.submodule }} to ${{ steps.latest.outputs.tag_name }}
body: |
Update ${{ matrix.submodule }} to ${{ steps.latest.outputs.tag_name }}
Current: ${{ env.SUBMODULE_REV }}
4 changes: 3 additions & 1 deletion .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: GitHub CI

on:
push:
workflow_dispatch:
workflow_dispatch: #

jobs:
build-linux:
Expand Down Expand Up @@ -41,6 +41,8 @@ jobs:
- name: install submodules and nasm
run: |
git submodule update --init --recursive
git clone https://github.com/ShiftMediaProject/VSYASM.git
.\VSYASM\install_script.bat
git clone https://github.com/ShiftMediaProject/VSNASM.git
.\VSNASM\install_script.bat
- uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion SMP/fontconfig
Submodule fontconfig updated 222 files