Skip to content

Commit db6c4d0

Browse files
committed
Update GitHub actions
1 parent 2880658 commit db6c4d0

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/migration-sql-comment.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
# hopefully this can be improved at some point; see this issue for details:
1616
# https://github.com/actions/download-artifact/issues/60
1717
- name: Download artifact
18-
uses: actions/github-script@v3.1.0
18+
uses: actions/github-script@v7
1919
with:
2020
script: |
2121
const artifacts = await github.actions.listWorkflowRunArtifacts({
@@ -50,15 +50,15 @@ jobs:
5050
fi
5151
5252
- name: Find previous comment
53-
uses: peter-evans/find-comment@v1
53+
uses: peter-evans/find-comment@v3
5454
id: find-comment
5555
with:
5656
issue-number: ${{ steps.get-data.outputs.pull_id }}
5757
body-includes: This PR contains database changes.
5858
comment-author: github-actions[bot]
5959

6060
- name: Create comment
61-
uses: peter-evans/create-or-update-comment@v1
61+
uses: peter-evans/create-or-update-comment@v4
6262
if: steps.get-data.outputs.sql
6363
with:
6464
issue-number: ${{ steps.get-data.outputs.pull_id }}
@@ -75,7 +75,7 @@ jobs:
7575
version, i.e. any new column needs to have a `server_default` or be nullable.
7676
7777
- name: Delete comment
78-
uses: peter-evans/create-or-update-comment@v1
78+
uses: peter-evans/create-or-update-comment@v4
7979
if: steps.find-comment.outputs.comment-id && !steps.get-data.outputs.sql
8080
with:
8181
issue-number: ${{ steps.get-data.outputs.pull_id }}

.github/workflows/migration-sql.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313

1414
- name: Setup Python
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v5
1616
with:
1717
python-version: '3.12'
1818

1919
- name: Get list of created migrations
2020
id: get-changed-files
21-
uses: ThiefMaster/changed-files-action@json-output
21+
uses: umani/changed-files@v4.2.0
2222
with:
2323
repo-token: ${{ github.token }}
24+
result-encoding: json
2425
pattern: '^newdle/migrations/versions/.+\.py$'
2526

2627
- name: Check if any migrations changed
@@ -53,12 +54,12 @@ jobs:
5354
- name: Print changed migrations
5455
if: steps.migrations-changed.outputs.changed == 'true'
5556
run: |
56-
first_migration=$(jq -r '.[0] // empty' ~/files_created.json)
57-
latest_migration=$(jq -r '.[-1] // empty' ~/files_created.json)
57+
first_migration=$(echo '${{ steps.get-changed-files.outputs.files_created }}' | jq -r '.[0] // empty')
58+
latest_migration=$(echo '${{ steps.get-changed-files.outputs.files_created }}' | jq -r '.[-1] // empty')
5859
./ci/print_revision_sql.sh $first_migration $latest_migration > /tmp/migration-sql-data/upgrade.sql
5960
6061
- name: Create artifact
61-
uses: actions/upload-artifact@v2
62+
uses: actions/upload-artifact@v4
6263
with:
6364
name: migration-sql-data
6465
path: /tmp/migration-sql-data

0 commit comments

Comments
 (0)