Skip to content

Commit 6499d74

Browse files
committed
chore: cleanup github actions file
1 parent 46e7b92 commit 6499d74

File tree

4 files changed

+40
-50
lines changed

4 files changed

+40
-50
lines changed

.github/workflows/pgschema-multifile-apply.yml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'multifile/**'
9-
- '.github/workflows/pgschema-multifile-apply.yml'
8+
- "multifile/**"
9+
- ".github/workflows/pgschema-multifile-apply.yml"
1010

1111
permissions:
1212
contents: read
1313

1414
jobs:
1515
pgschema-apply-multi:
1616
runs-on: ubuntu-latest
17-
17+
1818
env:
1919
PGPASSWORD: postgres
20-
20+
2121
services:
2222
postgres:
2323
image: postgres:17
@@ -32,30 +32,30 @@ jobs:
3232
--health-retries 5
3333
ports:
3434
- 5432:5432
35-
35+
3636
steps:
3737
- name: Checkout code
3838
uses: actions/checkout@v4
39-
39+
4040
- name: Setup Go
4141
uses: actions/setup-go@v5
4242
with:
43-
go-version: 'stable'
44-
43+
go-version: "stable"
44+
4545
- name: Install pgschema
4646
run: go install github.com/pgschema/pgschema@latest
47-
47+
4848
- name: Load baseline schema
4949
run: |
5050
echo "::group::Loading baseline schema to emulate remote database"
5151
PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d testdb -f baseline.sql
5252
echo "::endgroup::"
53-
53+
5454
- name: Run pgschema apply
5555
id: apply
5656
run: |
5757
echo "::group::Applying schema changes"
58-
58+
5959
# Run pgschema apply with auto-approve
6060
APPLY_OUTPUT=$(pgschema apply \
6161
--auto-approve \
@@ -68,24 +68,24 @@ jobs:
6868
--lock-timeout "30s" \
6969
--application-name "pgschema-github-action-apply" \
7070
--format human 2>&1)
71-
71+
7272
APPLY_EXIT_CODE=$?
73-
73+
7474
# Output the results
7575
echo "$APPLY_OUTPUT"
76-
76+
7777
echo "::endgroup::"
78-
78+
7979
# Set outputs for potential future use
8080
echo "output<<EOF" >> $GITHUB_OUTPUT
8181
echo "$APPLY_OUTPUT" >> $GITHUB_OUTPUT
8282
echo "EOF" >> $GITHUB_OUTPUT
83-
83+
8484
echo "exit_code=$APPLY_EXIT_CODE" >> $GITHUB_OUTPUT
85-
85+
8686
# Exit with the same code as pgschema
8787
exit $APPLY_EXIT_CODE
88-
88+
8989
- name: Report Success
9090
if: success()
9191
run: |
@@ -94,15 +94,10 @@ jobs:
9494
echo "Applied to database: testdb"
9595
echo "Application name: pgschema-github-action-apply"
9696
echo "Lock timeout: 30s"
97-
97+
9898
- name: Report Failure
9999
if: failure()
100100
run: |
101101
echo "❌ Failed to apply schema changes!"
102102
echo ""
103103
echo "Please check the logs above for details."
104-
echo "Common issues:"
105-
echo "- Schema syntax errors"
106-
echo "- Database connection issues"
107-
echo "- Lock timeout exceeded"
108-
echo "- Incompatible schema changes"

.github/workflows/pgschema-multifile-plan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
</details>
9090
9191
---
92-
*This comment was automatically generated by the pgschema Multi File Plan workflow.*`;
92+
*This comment was automatically generated by the [pgschema](https://www.pgschema.com) Multi File Plan workflow.*`;
9393
9494
// Try to find existing comment
9595
const { data: comments } = await github.rest.issues.listComments({

.github/workflows/pgschema-singlefile-apply.yml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'singlefile/**'
9-
- '.github/workflows/pgschema-singlefile-apply.yml'
8+
- "singlefile/**"
9+
- ".github/workflows/pgschema-singlefile-apply.yml"
1010

1111
permissions:
1212
contents: read
1313

1414
jobs:
1515
pgschema-apply-single:
1616
runs-on: ubuntu-latest
17-
17+
1818
env:
1919
PGPASSWORD: postgres
20-
20+
2121
services:
2222
postgres:
2323
image: postgres:17
@@ -32,30 +32,30 @@ jobs:
3232
--health-retries 5
3333
ports:
3434
- 5432:5432
35-
35+
3636
steps:
3737
- name: Checkout code
3838
uses: actions/checkout@v4
39-
39+
4040
- name: Setup Go
4141
uses: actions/setup-go@v5
4242
with:
43-
go-version: 'stable'
44-
43+
go-version: "stable"
44+
4545
- name: Install pgschema
4646
run: go install github.com/pgschema/pgschema@latest
47-
47+
4848
- name: Load baseline schema
4949
run: |
5050
echo "::group::Loading baseline schema to emulate remote database"
5151
PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d testdb -f baseline.sql
5252
echo "::endgroup::"
53-
53+
5454
- name: Run pgschema apply
5555
id: apply
5656
run: |
5757
echo "::group::Applying schema changes"
58-
58+
5959
# Run pgschema apply with auto-approve
6060
APPLY_OUTPUT=$(pgschema apply \
6161
--auto-approve \
@@ -68,24 +68,24 @@ jobs:
6868
--lock-timeout "30s" \
6969
--application-name "pgschema-github-action-apply" \
7070
--format human 2>&1)
71-
71+
7272
APPLY_EXIT_CODE=$?
73-
73+
7474
# Output the results
7575
echo "$APPLY_OUTPUT"
76-
76+
7777
echo "::endgroup::"
78-
78+
7979
# Set outputs for potential future use
8080
echo "output<<EOF" >> $GITHUB_OUTPUT
8181
echo "$APPLY_OUTPUT" >> $GITHUB_OUTPUT
8282
echo "EOF" >> $GITHUB_OUTPUT
83-
83+
8484
echo "exit_code=$APPLY_EXIT_CODE" >> $GITHUB_OUTPUT
85-
85+
8686
# Exit with the same code as pgschema
8787
exit $APPLY_EXIT_CODE
88-
88+
8989
- name: Report Success
9090
if: success()
9191
run: |
@@ -94,15 +94,10 @@ jobs:
9494
echo "Applied to database: testdb"
9595
echo "Application name: pgschema-github-action-apply"
9696
echo "Lock timeout: 30s"
97-
97+
9898
- name: Report Failure
9999
if: failure()
100100
run: |
101101
echo "❌ Failed to apply schema changes!"
102102
echo ""
103103
echo "Please check the logs above for details."
104-
echo "Common issues:"
105-
echo "- Schema syntax errors"
106-
echo "- Database connection issues"
107-
echo "- Lock timeout exceeded"
108-
echo "- Incompatible schema changes"

.github/workflows/pgschema-singlefile-plan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
</details>
9191
9292
---
93-
*This comment was automatically generated by the pgschema Single File Plan workflow.*`;
93+
*This comment was automatically generated by the [pgschema](https://www.pgschema.com) Single File Plan workflow.*`;
9494
9595
// Try to find existing comment
9696
const { data: comments } = await github.rest.issues.listComments({

0 commit comments

Comments
 (0)