-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #513 from HoomanDgtl/sub-modules
feat: GH that updates aep automatically (checks for update every 6 hrs)
- Loading branch information
Showing
9 changed files
with
319 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.