diff --git a/.github/workflows/update_regression_baseline.yml b/.github/workflows/update_regression_baseline.yml index 7af7c354..6bbf645d 100644 --- a/.github/workflows/update_regression_baseline.yml +++ b/.github/workflows/update_regression_baseline.yml @@ -2,7 +2,7 @@ name: Update Regression Baseline on: - # issue_comment: + # issue_comment: # event runs on the default branch # types: [created] pull_request: branches: @@ -11,8 +11,8 @@ on: jobs: update_regression_tests: name: update_regression_tests - # if: github.event.issue.pull_request && contains(github.event.comment.body, '/update_baseline') runs-on: ubuntu-20.04 + # if: github.event.issue.pull_request && contains(github.event.comment.body, '/update_baseline') permissions: contents: write pull-requests: write @@ -25,7 +25,7 @@ jobs: - name: Checkout PR branch uses: actions/checkout@v3 with: - # ref: ${{ steps.comment-branch.outputs.head_ref }} # using head_sha vs. head_ref makes this work for forks + # ref: ${{ steps.comment-branch.outputs.head_sha }} # using head_sha vs. head_ref makes this work for forks lfs: true fetch-depth: 0 # This ensures we can checkout main branch too @@ -49,6 +49,6 @@ jobs: - name: Commit and push if: github.event.pull_request.base.ref == 'main' run: | - git add tests/regression_test_baselines.json + git add -f tests/regression_test_baselines.json # since it's in .gitignore git commit -m "Update regression test baselines" - git push origin HEAD:${{ steps.comment-branch.outputs.head_ref }} \ No newline at end of file + git push origin HEAD:${{ steps.comment-branch.outputs.head_sha }} \ No newline at end of file