Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ci cassettes #4234

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/add-cassettes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ 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
uses: peter-evans/create-pull-request@v5
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."
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
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}