Skip to content

Commit a5435f6

Browse files
authored
Merge pull request #3850 from dev-hato/develop
リリース
2 parents 1f13b78 + ace4e60 commit a5435f6

File tree

67 files changed

+16399
-53915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+16399
-53915
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
DATABASE_URL=postgres://postgres:password@postgres:5432/
1+
DATABASE_URL=postgres://postgres:password@postgres:5432/?sslmode=require
22
DISCORD_API_TOKEN=
33
MISSKEY_API_TOKEN=
44
MISSKEY_DOMAIN=
5+
MISSKEY_FEDERATION=false
56
MODE=
67
OPENAI_API_KEY=
78
SLACK_API_TOKEN=

.github/workflows/add-to-task-list.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
steps:
1515
- name: Generate a token
1616
id: generate_token
17-
uses: actions/create-github-app-token@7bfa3a4717ef143a604ee0a99d859b8886a96d00 # v1.9.3
17+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
1818
with:
1919
app-id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
2020
private-key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
21-
- uses: dev-hato/actions-add-to-projects@4559e05fd53509ad4ae2bedff142dd8003ec59d3 # v0.0.65
21+
- uses: dev-hato/actions-add-to-projects@6b85916c6dcb4f2d40888c3ba373c783615538ee # v0.0.81
2222
with:
2323
github-token: ${{steps.generate_token.outputs.token}}
2424
project-url: https://github.com/orgs/dev-hato/projects/1

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

.github/workflows/deploy-hato-bot.yml

Lines changed: 73 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,44 @@ jobs:
2626
packages: write
2727
if: github.event_name == 'release' || (github.event_name == 'pull_request' && github.event.action != 'closed' && github.repository == github.event.pull_request.head.repo.full_name)
2828
steps:
29-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
29+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
3030
with:
3131
fetch-depth: 0
3232
- name: Set .env
3333
run: cp .env.example .env
3434
- name: Login to GitHub Container Registry
35-
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
35+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
3636
with:
3737
registry: ghcr.io
3838
username: ${{ github.actor }}
3939
password: ${{ secrets.GITHUB_TOKEN }}
4040
- name: Set up QEMU
41-
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
41+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
4242
- name: Set up Docker Buildx
4343
id: buildx
44-
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
44+
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
4545
- run: echo "TAG_NAME=${HEAD_REF//\//-}" >> "$GITHUB_ENV"
4646
env:
4747
HEAD_REF: ${{github.head_ref}}
4848
if: ${{ github.event_name == 'pull_request' }}
4949
- run: echo 'TAG_NAME=${{ github.event.release.tag_name }}' >> "$GITHUB_ENV"
5050
if: ${{ github.event_name == 'release' }}
5151
- name: Build and push (build)
52-
uses: docker/bake-action@017aa056d6bfc9797de5a5dd354a209dc07b490e # v4.3.0
52+
uses: docker/bake-action@e626c7390c9f95508a135a89e65ec698e061fb2a # v5.8.0
5353
env:
5454
DOCKER_CONTENT_TRUST: 1
5555
with:
5656
push: true
5757
files: build.docker-compose.yml
5858
- name: Build and push (main)
59-
uses: docker/bake-action@017aa056d6bfc9797de5a5dd354a209dc07b490e # v4.3.0
59+
uses: docker/bake-action@e626c7390c9f95508a135a89e65ec698e061fb2a # v5.8.0
6060
env:
6161
DOCKER_CONTENT_TRUST: 1
6262
with:
6363
push: true
6464
files: docker-compose.yml
6565
- name: Build and push (dev)
66-
uses: docker/bake-action@017aa056d6bfc9797de5a5dd354a209dc07b490e # v4.3.0
66+
uses: docker/bake-action@e626c7390c9f95508a135a89e65ec698e061fb2a # v5.8.0
6767
env:
6868
DOCKER_CONTENT_TRUST: 1
6969
with:
@@ -72,23 +72,23 @@ jobs:
7272
- run: echo 'TAG_NAME=latest' >> "$GITHUB_ENV"
7373
if: ${{ github.event_name == 'release' }}
7474
- name: Build and push (build) (latest)
75-
uses: docker/bake-action@017aa056d6bfc9797de5a5dd354a209dc07b490e # v4.3.0
75+
uses: docker/bake-action@e626c7390c9f95508a135a89e65ec698e061fb2a # v5.8.0
7676
if: ${{ github.event_name == 'release' }}
7777
env:
7878
DOCKER_CONTENT_TRUST: 1
7979
with:
8080
push: true
8181
files: build.docker-compose.yml
8282
- name: Build and push (main) (latest)
83-
uses: docker/bake-action@017aa056d6bfc9797de5a5dd354a209dc07b490e # v4.3.0
83+
uses: docker/bake-action@e626c7390c9f95508a135a89e65ec698e061fb2a # v5.8.0
8484
if: ${{ github.event_name == 'release' }}
8585
env:
8686
DOCKER_CONTENT_TRUST: 1
8787
with:
8888
push: true
8989
files: docker-compose.yml
9090
- name: Build and push (dev) (latest)
91-
uses: docker/bake-action@017aa056d6bfc9797de5a5dd354a209dc07b490e # v4.3.0
91+
uses: docker/bake-action@e626c7390c9f95508a135a89e65ec698e061fb2a # v5.8.0
9292
if: ${{ github.event_name == 'release' }}
9393
env:
9494
DOCKER_CONTENT_TRUST: 1
@@ -111,7 +111,7 @@ jobs:
111111
needs: deploy_docker_image
112112
if: always() && (needs.deploy_docker_image.result == 'success' || (github.event_name == 'pull_request' && github.event.action == 'closed'))
113113
steps:
114-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
114+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
115115
if: github.event_name != 'pull_request' || github.event.action != 'closed'
116116
with:
117117
fetch-depth: 0
@@ -122,20 +122,75 @@ jobs:
122122
run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/update_version_python_version/get_python_version.sh"
123123
env:
124124
HEAD_REF: ${{github.head_ref || github.event.release.tag_name}}
125-
- uses: dev-hato/actions-diff-pr-management@128afc4203b4e391e03868be91c987b2ddba7ea5 # v1.1.12
125+
- uses: dev-hato/actions-diff-pr-management@7cc8ab103917849f6995064afae9f4cbcfd009ae # v1.1.13
126126
with:
127127
github-token: ${{secrets.GITHUB_TOKEN}}
128128
branch-name-prefix: fix-version-python-version
129129
pr-title-prefix: .python-versionを直してあげたよ!
130+
pr-update-version:
131+
runs-on: ubuntu-latest
132+
needs: deploy_docker_image
133+
if: always() && (needs.deploy_docker_image.result == 'success' || (github.event_name == 'pull_request' && github.event.action == 'closed'))
134+
permissions:
135+
contents: write
136+
pull-requests: write
137+
steps:
138+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
139+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
140+
with:
141+
fetch-depth: 0
142+
ref: ${{ github.event.pull_request.head.sha }}
143+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
144+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
145+
with:
146+
cache: npm
147+
node-version-file: package.json
148+
- name: Get npm version
149+
id: get_npm_version
150+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
151+
run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/pr_update_version/get_npm_version.sh"
152+
env:
153+
HEAD_REF: ${{github.head_ref || github.event.release.tag_name}}
154+
- uses: dev-hato/actions-diff-pr-management@7cc8ab103917849f6995064afae9f4cbcfd009ae # v1.1.13
155+
with:
156+
github-token: ${{secrets.GITHUB_TOKEN}}
157+
branch-name-prefix: fix-version
158+
pr-title-prefix: nodeをアップデートしてあげたよ!
159+
# package.jsonに差分があれば、package.jsonからpackage-lock.jsonを作り出す
160+
pr-check-npm:
161+
runs-on: ubuntu-latest
162+
needs: pr-update-version
163+
steps:
164+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
165+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
166+
with:
167+
# ここでsubmodule持ってくるとdetached headにcommitして死ぬ
168+
# submodule: 'recursive'
169+
fetch-depth: 0
170+
ref: ${{ github.event.pull_request.head.sha }}
171+
- name: Set up Node.js
172+
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
173+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
174+
with:
175+
cache: npm
176+
node-version-file: package.json
177+
- name: Install dependencies
178+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
179+
run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/npm_install.sh"
180+
- uses: dev-hato/actions-diff-pr-management@7cc8ab103917849f6995064afae9f4cbcfd009ae # v1.1.13
181+
with:
182+
github-token: ${{secrets.GITHUB_TOKEN}}
183+
branch-name-prefix: npm
184+
pr-title-prefix: package.jsonやpackage-lock.jsonが更新されたので直してあげたよ!
130185
update-dockle:
131186
runs-on: ubuntu-latest
132187
steps:
133-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
188+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
134189
if: github.event_name != 'pull_request' || github.event.action != 'closed'
135190
with:
136191
fetch-depth: 0
137192
ref: ${{ github.event.pull_request.head.sha }}
138-
- uses: dev-hato/actions-update-dockle@c92b0e505cc4ed6dc1b4c2c6851193d02ce5fcba # v0.0.81
193+
- uses: dev-hato/actions-update-dockle@c826f84c72bdedef7eb84c90d4370405b984f0dc # v0.0.97
139194
with:
140195
github-token: ${{secrets.GITHUB_TOKEN}}
141196
dockle:
@@ -147,7 +202,7 @@ jobs:
147202
DOCKER_CONTENT_TRUST: 1
148203
REPOSITORY: ${{github.repository}}
149204
steps:
150-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
205+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
151206
- run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/dockle/run_dockle.sh"
152207
env:
153208
HEAD_REF: ${{github.head_ref || github.event.release.tag_name}}
@@ -156,12 +211,13 @@ jobs:
156211
if: always()
157212
needs:
158213
- update-version-python-version
214+
- pr-check-npm
159215
- update-dockle
160216
- dockle
161217
steps:
162-
- if: needs.update-dockle.result == 'success' && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) || (needs.update-version-python-version.result == 'success' && (github.event.action == 'closed' || needs.dockle.result == 'success')))
218+
- if: needs.update-dockle.result == 'success' && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) || (needs.update-version-python-version.result == 'success' && (github.event.action == 'closed' || (needs.pr-check-npm.result == 'success' && needs.dockle.result == 'success'))))
163219
run: exit 0
164-
- if: ${{ !(needs.update-dockle.result == 'success' && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) || (needs.update-version-python-version.result == 'success' && (github.event.action == 'closed' || needs.dockle.result == 'success')))) }}
220+
- if: ${{ !(needs.update-dockle.result == 'success' && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) || (needs.update-version-python-version.result == 'success' && (github.event.action == 'closed' || (needs.pr-check-npm.result == 'success' && needs.dockle.result == 'success'))))) }}
165221
run: exit 1
166222
concurrency:
167223
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}

.github/workflows/format-json-yml.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
steps:
2121
- name: Generate a token
2222
id: generate_token
23-
uses: actions/create-github-app-token@7bfa3a4717ef143a604ee0a99d859b8886a96d00 # v1.9.3
23+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
2424
with:
2525
app-id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
2626
private-key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
27-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
27+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2828
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2929
with:
3030
fetch-depth: 0
3131
ref: ${{ github.event.pull_request.head.sha }}
3232
token: ${{steps.generate_token.outputs.token}}
33-
- uses: dev-hato/actions-format-json-yml@8bc54d29568af8a0ef93d36db8fc559a8f76fd73 # v0.0.61
33+
- uses: dev-hato/actions-format-json-yml@bae3230b89fddb12957fc2a7b869ef833956ec78 # v0.0.72
3434
with:
3535
github-token: ${{steps.generate_token.outputs.token}}
3636
concurrency:

.github/workflows/github-actions-cache-cleaner.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
- develop
77
- master
88
schedule:
9-
- cron: '0 21 * * *' # 06:00 JST
9+
- cron: "0 21 * * *" # 06:00 JST
1010
workflow_dispatch:
1111
jobs:
1212
github-actions-cache-cleaner:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
16-
- uses: dev-hato/github-actions-cache-cleaner@8631f246ce2cc3142a954ada28c9c6671d4655ca # v0.0.37
15+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
16+
- uses: dev-hato/github-actions-cache-cleaner@d37872269f7da1f1763264f96f3d571c39fb91e1 # v0.0.52
1717
with:
1818
github-token: ${{secrets.GITHUB_TOKEN}}
1919
concurrency:

0 commit comments

Comments
 (0)