From 26936ab0d811faed5f39838cae3ac1a69c933c5e Mon Sep 17 00:00:00 2001 From: coffeegoddd Date: Fri, 12 Jan 2024 12:55:47 -0800 Subject: [PATCH] test push to pr branch --- .github/workflows/pull-report-test.yaml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/pull-report-test.yaml diff --git a/.github/workflows/pull-report-test.yaml b/.github/workflows/pull-report-test.yaml new file mode 100644 index 00000000000..e457d4aac06 --- /dev/null +++ b/.github/workflows/pull-report-test.yaml @@ -0,0 +1,40 @@ +on: + push: + branches: + - "db/test-workflow" + +jobs: + update-correctness-file: + name: Update Correctness File + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: "db/test" + repository: ${{ github.repository }} + token: ${{ secrets.REPO_ACCESS_TOKEN || secrets.GITHUB_TOKEN }} + - name: Write new correctness file + working-directory: ./.github/scripts/sql-correctness + env: + CORRECTNESS_PERCENTAGE: "fake-percentage-99" + run: | + if [ -z "$CORRECTNESS_PERCENTAGE" ]; then + echo "correctness percentage was empty, something went wrong" + exit 1 + fi + echo "$CORRECTNESS_PERCENTAGE" > current_correctness.txt + - name: Changes detected + id: detect-changes + run: | + changes=$(git status --porcelain) + if [ ! -z "$changes" ]; then + echo "has-changes=true" >> $GITHUB_OUTPUT + fi + - uses: EndBug/add-and-commit@v9.1.1 + if: ${{ steps.detect-changes.outputs.has-changes == 'true' }} + with: + message: ${{ format('[ga-update-correctness] SQL Correctness updated to {0}', 'fake-percentage-99') }} + add: "./current_correctness.txt" + cwd: "./.github/scripts/sql-correctness" + pull: "--ff"