Skip to content

Commit

Permalink
Merge pull request #1997 from dev-hato/develop
Browse files Browse the repository at this point in the history
リリース
  • Loading branch information
nakkaa authored Mar 9, 2023
2 parents 2c0d6c8 + 8c0258c commit 1c06292
Show file tree
Hide file tree
Showing 50 changed files with 5,213 additions and 3,991 deletions.
2 changes: 1 addition & 1 deletion .dockle-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.9
0.4.11
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
DATABASE_URL=postgres://postgres:password@postgres:5432/
DISCORD_API_TOKEN=
MISSKEY_API_TOKEN=
MISSKEY_DOMAIN=
MODE=
OPENAI_API_KEY=
SLACK_API_TOKEN=
SLACK_SIGNING_SECRET=
YAHOO_API_TOKEN=
3 changes: 2 additions & 1 deletion .github/workflows/add-to-task-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ on:
jobs:
add-to-task-list:
runs-on: ubuntu-latest
if: github.repository == github.event.pull_request.head.repo.full_name
steps:
- uses: dev-hato/actions-add-to-projects@v0.0.16
- uses: dev-hato/actions-add-to-projects@v0.0.26
with:
github_app_id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
github_app_private_key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.3.0
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/deploy-hato-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
packages: write
if: github.event_name == 'release' || (github.event_name == 'pull_request' && github.event.action != 'closed' && github.repository == github.event.pull_request.head.repo.full_name)
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
- name: Set .env
Expand All @@ -43,7 +43,7 @@ jobs:
uses: docker/setup-qemu-action@v2.1.0
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2.2.1
uses: docker/setup-buildx-action@v2.4.1
- run: echo "TAG_NAME=${HEAD_REF//\//-}" >> "$GITHUB_ENV"
env:
HEAD_REF: ${{github.head_ref}}
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Start docker
env:
DOCKER_CONTENT_TRUST: 1
run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/deploy_docker_image/test.sh"
run: docker compose up -d --wait

# .python-version をDockerイメージと同期させる
update-version-python-version:
Expand All @@ -114,7 +114,7 @@ jobs:
needs: deploy_docker_image
if: always() && (needs.deploy_docker_image.result == 'success' || (github.event_name == 'pull_request' && github.event.action == 'closed'))
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -123,7 +123,7 @@ jobs:
run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/update_version_python_version/get_python_version.sh"
env:
HEAD_REF: ${{github.head_ref || github.event.release.tag_name}}
- uses: dev-hato/actions-diff-pr-management@v1.1.1
- uses: dev-hato/actions-diff-pr-management@v1.1.3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: fix-version-python-version
Expand All @@ -132,14 +132,13 @@ jobs:
update-dockle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: dev-hato/actions-update-dockle@v0.0.33
- uses: dev-hato/actions-update-dockle@v0.0.43
with:
github-token: ${{secrets.GITHUB_TOKEN}}
repo-name: dev-hato/hato-bot

dockle:
runs-on: ubuntu-latest
Expand All @@ -150,7 +149,7 @@ jobs:
DOCKER_CONTENT_TRUST: 1
REPOSITORY: ${{github.repository}}
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
- run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/dockle/run_dockle.sh"
env:
HEAD_REF: ${{github.head_ref || github.event.release.tag_name}}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/format-json-yml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ jobs:
format-json-yml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: dev-hato/actions-format-json-yml@v0.0.27
- uses: dev-hato/actions-format-json-yml@v0.0.34
with:
github-token: ${{secrets.GITHUB_TOKEN}}
repo-name: dev-hato/hato-bot
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
24 changes: 24 additions & 0 deletions .github/workflows/github-actions-cache-cleaner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: github-actions-cache-cleaner

on:
push:
branches:
- develop
- master
schedule:
- cron: '0 21 * * *' # 06:00 JST
workflow_dispatch:

jobs:
github-actions-cache-cleaner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
- uses: dev-hato/github-actions-cache-cleaner@v0.0.9
with:
github-token: ${{secrets.GITHUB_TOKEN}}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
12 changes: 6 additions & 6 deletions .github/workflows/pr-check-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v3.5.1
- uses: actions/setup-node@v3.6.0
with:
cache: npm
- name: Get Dependabot npm version
id: get_dependabot_npm_version
run: bash "${GITHUB_WORKSPACE}/scripts/pr_check_npm/pr_update_version/get_dependabot_npm_version.sh"
- uses: dev-hato/actions-diff-pr-management@v1.1.1
- uses: dev-hato/actions-diff-pr-management@v1.1.3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: fix-version
Expand All @@ -41,19 +41,19 @@ jobs:
runs-on: ubuntu-latest
needs: pr-update-version
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
# ここでsubmodule持ってくるとdetached headにcommitして死ぬ
# submodule: 'recursive'
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Node.js
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v3.6.0
with:
cache: npm
- name: Install dependencies
run: bash "${GITHUB_WORKSPACE}/scripts/pr_check_npm/npm_install.sh"
- uses: dev-hato/actions-diff-pr-management@v1.1.1
- uses: dev-hato/actions-diff-pr-management@v1.1.3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: npm
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-copy-ci-hato-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
path: hato-bot
- name: Set org name
uses: actions/github-script@v6.3.3
uses: actions/github-script@v6.4.0
id: set_org_name
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script:
return process.env.GITHUB_REPOSITORY.split('/')[0]
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
repository: ${{steps.set_org_name.outputs.result}}/sudden-death
path: sudden-death
- name: Copy CI
run: bash "${GITHUB_WORKSPACE}/hato-bot/scripts/pr_copy_ci_hato_bot/pr_copy_ci/copy_ci.sh"
- name: Copy package.json
uses: actions/github-script@v6.3.3
uses: actions/github-script@v6.4.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
pr-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
# ここでsubmodule持ってくるとdetached headにcommitして死ぬ
# submodule: 'recursive'
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- run: bash "${GITHUB_WORKSPACE}/scripts/pr_format/pr_format/get_version.sh"
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v4.5.0
with:
python-version: ${{env.PYTHON_VERSION }}
cache: pipenv
Expand All @@ -43,7 +43,7 @@ jobs:
id: format
run: bash "${GITHUB_WORKSPACE}/scripts/pr_format/pr_format/format.sh"
continue-on-error: true
- uses: dev-hato/actions-diff-pr-management@v1.1.1
- uses: dev-hato/actions-diff-pr-management@v1.1.3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: fix-format
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-merge-develop-hato-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
- name: Set org name
uses: actions/github-script@v6.3.3
uses: actions/github-script@v6.4.0
id: set_org_name
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script:
return process.env.GITHUB_REPOSITORY.split('/')[0]
- name: Get PullRequests
uses: actions/github-script@v6.3.3
uses: actions/github-script@v6.4.0
id: get_pull_requests
env:
ORG_NAME: ${{steps.set_org_name.outputs.result}}
Expand All @@ -35,7 +35,7 @@ jobs:
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/get_pull_requests_hato_bot.js`)
return await script({github, context})
- name: Create PullRequest
uses: actions/github-script@v6.3.3
uses: actions/github-script@v6.4.0
if: ${{ steps.get_pull_requests.outputs.result == 0 }}
env:
ORG_NAME: ${{steps.set_org_name.outputs.result}}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-release-hato-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
- name: Get diff
id: get_diff
run: bash "${GITHUB_WORKSPACE}/scripts/pr_release_hato_bot/pr_release/get_diff.sh"
- name: Set org name
uses: actions/github-script@v6.3.3
uses: actions/github-script@v6.4.0
id: set_org_name
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script:
return process.env.GITHUB_REPOSITORY.split('/')[0]
- name: Get PullRequests
uses: actions/github-script@v6.3.3
uses: actions/github-script@v6.4.0
if: ${{ steps.get_diff.outputs.result != '' }}
id: get_pull_requests
env:
Expand All @@ -38,7 +38,7 @@ jobs:
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/get_pull_requests_hato_bot.js`)
return await script({github, context})
- name: Create PullRequest
uses: actions/github-script@v6.3.3
uses: actions/github-script@v6.4.0
if: ${{ steps.get_diff.outputs.result != ''
&& steps.get_pull_requests.outputs.result == 0 }}
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-renovate-config-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
pr-renovate-config-validator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
- name: Set up Node.js
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v3.6.0
with:
cache: npm
- run: bash "${GITHUB_WORKSPACE}/scripts/pr_renovate_config_validator/pr_renovate_config_validator/run_validator.sh"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-test-hato-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
submodules: "recursive"
- run: echo "PYTHON_VERSION=$(cat .python-version)" >> "${GITHUB_ENV}"
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pipenv
- name: Install pipenv
- name: Test
run: bash "${GITHUB_WORKSPACE}/scripts/pr_test_hato_bot/pr_test/test.sh"

concurrency:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
pr-super-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.3.0
with:
submodules: "recursive"
fetch-depth: 0
- run: echo "PYTHON_VERSION=$(cat .python-version)" >> "${GITHUB_ENV}"
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pipenv
Expand All @@ -25,13 +25,13 @@ jobs:
DEST_PATH: "/home/runner/work/_temp/_github_workflow/.venv"
run: bash "${GITHUB_WORKSPACE}/scripts/pr_test/pr_super_lint/install_pipenv.sh"
- name: Set up Node.js
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v3.6.0
with:
cache: npm
- name: Install dependencies
run: bash "${GITHUB_WORKSPACE}/scripts/pr_test/pr_super_lint/npm_ci.sh"
- name: Lint files
uses: github/super-linter/slim@v4.9.7
uses: github/super-linter/slim@v4.10.1
env:
VALIDATE_ALL_CODEBASE: true
VALIDATE_SQLFLUFF: false
Expand All @@ -48,7 +48,7 @@ jobs:
submodules: "recursive"
fetch-depth: 0
- name: Lint dotenv
uses: dotenv-linter/action-dotenv-linter@v2.16.0
uses: dotenv-linter/action-dotenv-linter@v2.17.0
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
Loading

0 comments on commit 1c06292

Please sign in to comment.