Skip to content

Commit 40f5904

Browse files
authored
Merge pull request #2561 from dev-hato/develop
リリース
2 parents 2bc8a11 + de8f9b3 commit 40f5904

File tree

64 files changed

+6807
-24529
lines changed

Some content is hidden

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

64 files changed

+6807
-24529
lines changed

.dockle-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.11
1+
0.4.14

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ on:
1010
jobs:
1111
add-to-task-list:
1212
runs-on: ubuntu-latest
13-
if: github.repository == github.event.pull_request.head.repo.full_name
13+
if: github.event_name == 'issues' || github.repository == github.event.pull_request.head.repo.full_name
1414
steps:
15-
- uses: dev-hato/actions-add-to-projects@v0.0.31
15+
- name: Generate a token
16+
id: generate_token
17+
uses: actions/create-github-app-token@f4c6bf6752984b3a29fcc135a5e70eb792c40c6b # v1.8.0
1618
with:
17-
github_app_id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
18-
github_app_private_key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
19+
app-id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
20+
private-key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
21+
- uses: dev-hato/actions-add-to-projects@dcafd4eb5253d6ae0f4f29cff0dc46fd29bb5128 # v0.0.60
22+
with:
23+
github-token: ${{steps.generate_token.outputs.token}}
1924
project-url: https://github.com/orgs/dev-hato/projects/1
Lines changed: 56 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,80 @@
1-
---
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
212
name: "CodeQL"
313
on:
14+
push:
15+
branches: ["develop", "master"]
416
pull_request:
5-
# The branches below must be a subset of the branches above
6-
branches: [develop, master]
17+
branches: ["develop", "master"]
718
schedule:
8-
- cron: '0 21 * * 0'
19+
- cron: '19 8 * * 5'
920
jobs:
1021
analyze:
1122
name: Analyze
12-
runs-on: ubuntu-latest
23+
# Runner size impacts CodeQL analysis time. To learn more, please see:
24+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
25+
# - https://gh.io/supported-runners-and-hardware-resources
26+
# - https://gh.io/using-larger-runners
27+
# Consider using larger runners for possible analysis time improvements.
28+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
29+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
30+
permissions:
31+
actions: read
32+
contents: read
33+
security-events: write
1334
strategy:
1435
fail-fast: false
1536
matrix:
16-
# Override automatic language detection by changing the below list
17-
# Supported options are
18-
# ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
19-
language: ['python']
20-
# Learn more...
21-
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
37+
language: ['javascript-typescript', 'python']
38+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
39+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
40+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
41+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
2242
steps:
2343
- name: Checkout repository
24-
uses: actions/checkout@v3.5.0
44+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
45+
- name: Set up Python
46+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
47+
if: matrix.language == 'python'
2548
with:
26-
# We must fetch at least the immediate parents so that if this is
27-
# a pull request then we can checkout the head.
28-
fetch-depth: 2
29-
# If this run was triggered by a pull request event, then checkout
30-
# the head of the pull request instead of the merge commit.
31-
- run: git checkout HEAD^2
32-
if: ${{ github.event_name == 'pull_request' }}
49+
python-version-file: .python-version
50+
cache: pipenv
3351
# Initializes the CodeQL tools for scanning.
3452
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@v2
53+
uses: github/codeql-action/init@e675ced7a7522a761fc9c8eb26682c8b27c42b2b # v3.24.1
3654
with:
3755
languages: ${{ matrix.language }}
38-
# Autobuild attempts to build any compiled languages
39-
# (C/C++, C#, or Java).
40-
# If this step fails,
41-
# then you should remove it and run the build manually (see below)
56+
# If you wish to specify custom queries, you can do so here or in a config file.
57+
# By default, queries listed here will override any specified in a config file.
58+
# Prefix the list here with "+" to use these queries and those in the config file.
59+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
60+
# If this step fails, then you should remove it and run the build manually (see below)
4261
- name: Autobuild
43-
uses: github/codeql-action/autobuild@v2
44-
# ℹ️ Command-line programs to run using the OS shell.
45-
# 📚 https://git.io/JvXDl
62+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
63+
# queries: security-extended,security-and-quality
4664

47-
# ✏️ If the Autobuild fails above,
48-
# remove it and uncomment the following three lines
49-
# and modify them (or add more) to build your code if your project
50-
# uses a compiled language
51-
52-
#- run: |
53-
# make bootstrap
54-
# make release
65+
uses: github/codeql-action/autobuild@e675ced7a7522a761fc9c8eb26682c8b27c42b2b # v3.24.1
66+
# - run: |
67+
# echo "Run, Build Application using script"
68+
# ./location_of_script_within_repo/buildscript.sh
5569
- name: Perform CodeQL Analysis
56-
uses: github/codeql-action/analyze@v2
70+
# ℹ️ Command-line programs to run using the OS shell.
71+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
5772

73+
# If the Autobuild fails above, remove it and uncomment the following three lines.
74+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
75+
uses: github/codeql-action/analyze@e675ced7a7522a761fc9c8eb26682c8b27c42b2b # v3.24.1
76+
with:
77+
category: "/language:${{matrix.language}}"
5878
concurrency:
5979
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
6080
cancel-in-progress: true
Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
name: deploy-hato-bot
3-
43
on:
54
release:
65
types:
@@ -15,7 +14,6 @@ on:
1514
branches:
1615
- master
1716
- develop
18-
1917
jobs:
2018
deploy_docker_image:
2119
runs-on: ubuntu-latest
@@ -28,80 +26,79 @@ jobs:
2826
packages: write
2927
if: github.event_name == 'release' || (github.event_name == 'pull_request' && github.event.action != 'closed' && github.repository == github.event.pull_request.head.repo.full_name)
3028
steps:
31-
- uses: actions/checkout@v3.5.0
29+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3230
with:
3331
fetch-depth: 0
3432
- name: Set .env
3533
run: cp .env.example .env
3634
- name: Login to GitHub Container Registry
37-
uses: docker/login-action@v2.1.0
35+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
3836
with:
3937
registry: ghcr.io
4038
username: ${{ github.actor }}
4139
password: ${{ secrets.GITHUB_TOKEN }}
4240
- name: Set up QEMU
43-
uses: docker/setup-qemu-action@v2.1.0
41+
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
4442
- name: Set up Docker Buildx
4543
id: buildx
46-
uses: docker/setup-buildx-action@v2.5.0
44+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
4745
- run: echo "TAG_NAME=${HEAD_REF//\//-}" >> "$GITHUB_ENV"
4846
env:
4947
HEAD_REF: ${{github.head_ref}}
5048
if: ${{ github.event_name == 'pull_request' }}
5149
- run: echo 'TAG_NAME=${{ github.event.release.tag_name }}' >> "$GITHUB_ENV"
5250
if: ${{ github.event_name == 'release' }}
5351
- name: Build and push (build)
54-
uses: docker/bake-action@v2.3.0
52+
uses: docker/bake-action@849707117b03d39aba7924c50a10376a69e88d7d # v4.1.0
5553
env:
5654
DOCKER_CONTENT_TRUST: 1
5755
with:
5856
push: true
5957
files: build.docker-compose.yml
6058
- name: Build and push (main)
61-
uses: docker/bake-action@v2.3.0
59+
uses: docker/bake-action@849707117b03d39aba7924c50a10376a69e88d7d # v4.1.0
6260
env:
6361
DOCKER_CONTENT_TRUST: 1
6462
with:
6563
push: true
6664
files: docker-compose.yml
6765
- name: Build and push (dev)
68-
uses: docker/bake-action@v2.3.0
66+
uses: docker/bake-action@849707117b03d39aba7924c50a10376a69e88d7d # v4.1.0
6967
env:
7068
DOCKER_CONTENT_TRUST: 1
7169
with:
7270
push: true
73-
files: docker-compose.yml,dev.docker-compose.yml
71+
files: docker-compose.yml,dev.base.docker-compose.yml
7472
- run: echo 'TAG_NAME=latest' >> "$GITHUB_ENV"
7573
if: ${{ github.event_name == 'release' }}
7674
- name: Build and push (build) (latest)
77-
uses: docker/bake-action@v2.3.0
75+
uses: docker/bake-action@849707117b03d39aba7924c50a10376a69e88d7d # v4.1.0
7876
if: ${{ github.event_name == 'release' }}
7977
env:
8078
DOCKER_CONTENT_TRUST: 1
8179
with:
8280
push: true
8381
files: build.docker-compose.yml
8482
- name: Build and push (main) (latest)
85-
uses: docker/bake-action@v2.3.0
83+
uses: docker/bake-action@849707117b03d39aba7924c50a10376a69e88d7d # v4.1.0
8684
if: ${{ github.event_name == 'release' }}
8785
env:
8886
DOCKER_CONTENT_TRUST: 1
8987
with:
9088
push: true
9189
files: docker-compose.yml
9290
- name: Build and push (dev) (latest)
93-
uses: docker/bake-action@v2.3.0
91+
uses: docker/bake-action@849707117b03d39aba7924c50a10376a69e88d7d # v4.1.0
9492
if: ${{ github.event_name == 'release' }}
9593
env:
9694
DOCKER_CONTENT_TRUST: 1
9795
with:
9896
push: true
99-
files: docker-compose.yml,dev.docker-compose.yml
97+
files: docker-compose.yml,dev.base.docker-compose.yml
10098
- name: Start docker
10199
env:
102100
DOCKER_CONTENT_TRUST: 1
103101
run: docker compose up -d --wait
104-
105102
# .python-version をDockerイメージと同期させる
106103
update-version-python-version:
107104
runs-on: ubuntu-latest
@@ -114,32 +111,33 @@ jobs:
114111
needs: deploy_docker_image
115112
if: always() && (needs.deploy_docker_image.result == 'success' || (github.event_name == 'pull_request' && github.event.action == 'closed'))
116113
steps:
117-
- uses: actions/checkout@v3.5.0
114+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
115+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
118116
with:
119117
fetch-depth: 0
120118
ref: ${{ github.event.pull_request.head.sha }}
121119
- name: Get Python version
122120
id: get_python_version
121+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
123122
run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/update_version_python_version/get_python_version.sh"
124123
env:
125124
HEAD_REF: ${{github.head_ref || github.event.release.tag_name}}
126-
- uses: dev-hato/actions-diff-pr-management@v1.1.3
125+
- uses: dev-hato/actions-diff-pr-management@128afc4203b4e391e03868be91c987b2ddba7ea5 # v1.1.12
127126
with:
128127
github-token: ${{secrets.GITHUB_TOKEN}}
129128
branch-name-prefix: fix-version-python-version
130129
pr-title-prefix: .python-versionを直してあげたよ!
131-
132130
update-dockle:
133131
runs-on: ubuntu-latest
134132
steps:
135-
- uses: actions/checkout@v3.5.0
133+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
134+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
136135
with:
137136
fetch-depth: 0
138137
ref: ${{ github.event.pull_request.head.sha }}
139-
- uses: dev-hato/actions-update-dockle@v0.0.47
138+
- uses: dev-hato/actions-update-dockle@c92b0e505cc4ed6dc1b4c2c6851193d02ce5fcba # v0.0.81
140139
with:
141140
github-token: ${{secrets.GITHUB_TOKEN}}
142-
143141
dockle:
144142
runs-on: ubuntu-latest
145143
needs:
@@ -149,11 +147,10 @@ jobs:
149147
DOCKER_CONTENT_TRUST: 1
150148
REPOSITORY: ${{github.repository}}
151149
steps:
152-
- uses: actions/checkout@v3.5.0
150+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
153151
- run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/dockle/run_dockle.sh"
154152
env:
155153
HEAD_REF: ${{github.head_ref || github.event.release.tag_name}}
156-
157154
deploy-complete:
158155
runs-on: ubuntu-latest
159156
if: always()
@@ -166,7 +163,6 @@ jobs:
166163
run: exit 0
167164
- 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')))) }}
168165
run: exit 1
169-
170166
concurrency:
171167
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
172168
cancel-in-progress: true

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@ jobs:
1818
format-json-yml:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v3.5.0
21+
- name: Generate a token
22+
id: generate_token
23+
uses: actions/create-github-app-token@f4c6bf6752984b3a29fcc135a5e70eb792c40c6b # v1.8.0
24+
with:
25+
app-id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
26+
private-key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
27+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2229
with:
2330
fetch-depth: 0
2431
ref: ${{ github.event.pull_request.head.sha }}
25-
- uses: dev-hato/actions-format-json-yml@v0.0.36
32+
token: ${{steps.generate_token.outputs.token}}
33+
- uses: dev-hato/actions-format-json-yml@8bc54d29568af8a0ef93d36db8fc559a8f76fd73 # v0.0.61
2634
with:
27-
github-token: ${{secrets.GITHUB_TOKEN}}
35+
github-token: ${{steps.generate_token.outputs.token}}
2836
concurrency:
2937
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
3038
cancel-in-progress: true
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
name: github-actions-cache-cleaner
3-
43
on:
54
push:
65
branches:
@@ -9,16 +8,14 @@ on:
98
schedule:
109
- cron: '0 21 * * *' # 06:00 JST
1110
workflow_dispatch:
12-
1311
jobs:
1412
github-actions-cache-cleaner:
1513
runs-on: ubuntu-latest
1614
steps:
17-
- uses: actions/checkout@v3.5.0
18-
- uses: dev-hato/github-actions-cache-cleaner@v0.0.13
15+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16+
- uses: dev-hato/github-actions-cache-cleaner@8631f246ce2cc3142a954ada28c9c6671d4655ca # v0.0.37
1917
with:
2018
github-token: ${{secrets.GITHUB_TOKEN}}
21-
2219
concurrency:
2320
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
2421
cancel-in-progress: true

0 commit comments

Comments
 (0)