mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-10 07:38:04 -05:00
fix ci cassettes (#4234)
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
This commit is contained in:
4
.github/workflows/add-cassettes.yml
vendored
4
.github/workflows/add-cassettes.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
- name: Reset branch
|
||||
run: |
|
||||
git checkout ${{ github.event.pull_request.base.ref }}
|
||||
git reset --hard origin/cassette-diff-${{ github.event.pull_request.number }}
|
||||
git reset --hard origin/cassette-diff-${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Create PR
|
||||
id: create_pr
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
with:
|
||||
commit-message: Update cassettes
|
||||
signoff: false
|
||||
branch: cassette-diff-${{ github.event.pull_request.number }}
|
||||
branch: cassette-diff-${{ github.event.pull_request.head.sha }}
|
||||
delete-branch: false
|
||||
title: "Update cassettes"
|
||||
body: "This PR updates the cassettes."
|
||||
|
||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -95,11 +95,13 @@ jobs:
|
||||
|
||||
- name: Stage new files and commit
|
||||
run: |
|
||||
COMMIT_SHA=$(git rev-parse HEAD) # take the sha before committing the cassette
|
||||
git add tests
|
||||
git diff --cached --quiet && echo "No changes to commit" && exit 0
|
||||
git config user.email "github-actions@github.com"
|
||||
git config user.name "GitHub Actions"
|
||||
git commit -m "Add new cassettes"
|
||||
git checkout -b cassette-diff-${{ github.event.pull_request.number }}
|
||||
|
||||
git checkout -b cassette-diff-${COMMIT_SHA}
|
||||
git remote add target https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.base.repo.full_name }}
|
||||
git push -f target cassette-diff-${{ github.event.pull_request.number }}
|
||||
git push -f target cassette-diff-${COMMIT_SHA}
|
||||
|
||||
Reference in New Issue
Block a user