GHA: Cache godot & limboai treeish SHA to use with all builds

This commit is contained in:
Serhii Snitsaruk 2023-11-03 12:45:55 +01:00
parent f231e854e5
commit 58848b709c
1 changed files with 44 additions and 12 deletions

View File

@ -12,44 +12,76 @@ on:
default: master default: master
jobs: jobs:
cache-sha:
name: Cache treeish SHA
runs-on: ubuntu-latest
outputs:
godot-sha: ${{ steps.cache-sha.outputs.godot-sha }}
limboai-sha: ${{ steps.cache-sha.outputs.limboai-sha }}
steps:
- name: Clone Godot
uses: actions/checkout@v3
with:
repository: godotengine/godot
ref: ${{ inputs.godot-treeish }}
- name: Clone LimboAI module
uses: actions/checkout@v3
with:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
- name: Cache SHA
id: cache-sha
run: |
echo "godot-sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
cd modules/limboai
echo "limboai-sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
android-build: android-build:
name: 🤖 Android name: 🤖 Android
needs: cache-sha
uses: ./.github/workflows/android.yml uses: ./.github/workflows/android.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-sha.outputs.godot-sha }}
limboai-treeish: ${{ inputs.limboai-treeish }} limboai-treeish: ${{ needs.cache-sha.outputs.limboai-sha }}
ios-build: ios-build:
name: 🍏 iOS name: 🍏 iOS
needs: cache-sha
uses: ./.github/workflows/ios.yml uses: ./.github/workflows/ios.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-sha.outputs.godot-sha }}
limboai-treeish: ${{ inputs.limboai-treeish }} limboai-treeish: ${{ needs.cache-sha.outputs.limboai-sha }}
linux-build: linux-build:
name: 🐧 Linux name: 🐧 Linux
needs: cache-sha
uses: ./.github/workflows/linux.yml uses: ./.github/workflows/linux.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-sha.outputs.godot-sha }}
limboai-treeish: ${{ inputs.limboai-treeish }} limboai-treeish: ${{ needs.cache-sha.outputs.limboai-sha }}
macos-build: macos-build:
name: 🍎 macOS name: 🍎 macOS
needs: cache-sha
uses: ./.github/workflows/macos.yml uses: ./.github/workflows/macos.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-sha.outputs.godot-sha }}
limboai-treeish: ${{ inputs.limboai-treeish }} limboai-treeish: ${{ needs.cache-sha.outputs.limboai-sha }}
windows-build: windows-build:
name: 🪟 Windows name: 🪟 Windows
needs: cache-sha
uses: ./.github/workflows/windows.yml uses: ./.github/workflows/windows.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-sha.outputs.godot-sha }}
limboai-treeish: ${{ inputs.limboai-treeish }} limboai-treeish: ${{ needs.cache-sha.outputs.limboai-sha }}
web-build: web-build:
name: 🌐 Web name: 🌐 Web
needs: cache-sha
uses: ./.github/workflows/web.yml uses: ./.github/workflows/web.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-sha.outputs.godot-sha }}
limboai-treeish: ${{ inputs.limboai-treeish }} limboai-treeish: ${{ needs.cache-sha.outputs.limboai-sha }}