This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
Merge embeddings list updates #105
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
name: Merge embeddings list updates | |
on: | |
schedule: | |
# everyday at 0:10 UTC | |
- cron: 10 0 * * * | |
workflow_dispatch: {} | |
permissions: write-all | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.MERGE_PR_TOKEN_DEVX_BOT }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
PR_NUMBER="$(gh pr list --label automerge --label embeddings-list-update --json number | jq -r '.[0].number')" | |
if [ "$PR_NUMBER" = "null" ] | |
then | |
echo "no oustanding PR...skipping" | |
exit 0 | |
else | |
echo "approving PR" | |
gh pr review $PR_NUMBER --approve | |
echo "squashing PR: $PR_NUMBER" | |
gh pr merge $PR_NUMBER --auto --squash | |
fi |