Skip to content

Update AEP Specs

Update AEP Specs #3

name: Update AEP Specs
on:
schedule:
- cron: "0 */6 * * *" # Check every 6 hours
workflow_dispatch:
jobs:
update-specs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Clone and Update Specs
run: |
# Remove existing specs
rm -rf src/content/aeps
# Clone only the necessary files
git clone --depth 1 --filter=blob:none https://github.com/akash-network/AEP.git temp_aep
# Create target directory and copy only spec folder
mkdir -p src/content/aeps
cp -r temp_aep/spec/* src/content/aeps/
rm -rf temp_aep
# Check for changes
if [[ -n $(git status --porcelain) ]]; then
echo "Changes detected in specs"
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add src/content/aeps
git commit -m "chore: update AEP specs"
git push
else
echo "No changes in specs"
fi
- name: Trigger Build
if: success()
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: spec-update