-
-
Notifications
You must be signed in to change notification settings - Fork 531
40 lines (39 loc) · 1.33 KB
/
pull-report-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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/[email protected]
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"