mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 10:05:41 -05:00
Merge pull request #227 from FunkinCrew/rewrite/ci-verify-submodule-commits
ci: verify whether submodules are functional before attempting build
This commit is contained in:
commit
d03543c197
1 changed files with 20 additions and 6 deletions
26
.github/workflows/build-shit.yml
vendored
26
.github/workflows/build-shit.yml
vendored
|
@ -13,9 +13,23 @@ jobs:
|
|||
steps:
|
||||
- name: ensure git cli is installed
|
||||
run: apt update && apt install sudo git -y
|
||||
- uses: actions/checkout@v3
|
||||
- name: print latest_commit
|
||||
run: echo ${{ github.sha }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
token: ${{ secrets.GH_RO_PAT }}
|
||||
- name: check whether submodules exist
|
||||
run: |
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
|
||||
# debug output
|
||||
echo gh=${{ github.sha }}
|
||||
echo head=$(git rev-parse HEAD)
|
||||
echo art=$(git -C art rev-parse HEAD)
|
||||
echo assets=$(git -C assets rev-parse HEAD)
|
||||
|
||||
# checks if HEAD commit hash in submodules is diff from current repo, and therefore exists
|
||||
test $(git rev-parse HEAD) != $(git -C art rev-parse HEAD)
|
||||
test $(git rev-parse HEAD) != $(git -C assets rev-parse HEAD)
|
||||
- id: should_run
|
||||
continue-on-error: true
|
||||
name: check latest commit is less than a day
|
||||
|
@ -33,7 +47,7 @@ jobs:
|
|||
apt install sudo git curl unzip -y
|
||||
echo $GITHUB_WORKSPACE
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
token: ${{ secrets.GH_RO_PAT }}
|
||||
|
@ -56,7 +70,7 @@ jobs:
|
|||
contents: write
|
||||
actions: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
token: ${{ secrets.GH_RO_PAT }}
|
||||
|
@ -91,7 +105,7 @@ jobs:
|
|||
# contents: write
|
||||
# actions: write
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - uses: actions/checkout@v4
|
||||
# with:
|
||||
# submodules: 'recursive'
|
||||
# token: ${{ secrets.GH_RO_PAT }}
|
||||
|
|
Loading…
Reference in a new issue