Skip to content

Commit

Permalink
Merge pull request #4 from Uniswap/feat/update-script
Browse files Browse the repository at this point in the history
Add script to update submodules daily
  • Loading branch information
gretzke authored Jul 25, 2024
2 parents 854d98f + 6e7c79b commit 667b903
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 129 deletions.
89 changes: 0 additions & 89 deletions .github/workflows/coverage.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/test.yaml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/update-submodules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Update Submodules

on:
push:
branches:
- main
- staging
- dev
schedule:
# Run this workflow daily at 03:17 UTC
- cron: "17 3 * * *"

jobs:
update-submodules:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Update Submodules
run: |
git submodule update --init --remote
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Check for Changes
id: git-check
run: |
echo "::set-output name=changes::$(git status --porcelain)"
- name: Commit and Push if Changes are Present
if: steps.git-check.outputs.changes != ''
run: |
git remote set-url origin [email protected]:${{ github.repository }}.git
git add .
git commit -m "Update submodules"
git push

0 comments on commit 667b903

Please sign in to comment.