Skip to content

Commit 542d8c3

Browse files
authored
Merge pull request #1240 from dev-hato/develop
v2.4.2 リリース
2 parents 4779d49 + 6732fd0 commit 542d8c3

File tree

92 files changed

+71208
-4152
lines changed

Some content is hidden

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

92 files changed

+71208
-4152
lines changed

.dockle-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.4.9
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Add to Task List
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- reopened
7+
issues:
8+
types:
9+
- opened
10+
jobs:
11+
add-to-task-list:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: dev-hato/actions-add-to-projects@v0.0.16
15+
with:
16+
github_app_id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
17+
github_app_private_key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
18+
project-url: https://github.com/orgs/dev-hato/projects/1

.github/workflows/codeql-analysis.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
---
22
name: "CodeQL"
3-
43
on:
54
pull_request:
65
# The branches below must be a subset of the branches above
76
branches: [develop, master]
87
schedule:
98
- cron: '0 21 * * 0'
10-
119
jobs:
1210
analyze:
1311
name: Analyze
1412
runs-on: ubuntu-latest
15-
1613
strategy:
1714
fail-fast: false
1815
matrix:
@@ -22,33 +19,28 @@ jobs:
2219
language: ['python']
2320
# Learn more...
2421
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
25-
2622
steps:
2723
- name: Checkout repository
28-
uses: actions/checkout@v3.0.2
24+
uses: actions/checkout@v3.1.0
2925
with:
3026
# We must fetch at least the immediate parents so that if this is
3127
# a pull request then we can checkout the head.
3228
fetch-depth: 2
33-
3429
# If this run was triggered by a pull request event, then checkout
3530
# the head of the pull request instead of the merge commit.
3631
- run: git checkout HEAD^2
3732
if: ${{ github.event_name == 'pull_request' }}
38-
3933
# Initializes the CodeQL tools for scanning.
4034
- name: Initialize CodeQL
4135
uses: github/codeql-action/init@v2
4236
with:
4337
languages: ${{ matrix.language }}
44-
4538
# Autobuild attempts to build any compiled languages
4639
# (C/C++, C#, or Java).
4740
# If this step fails,
4841
# then you should remove it and run the build manually (see below)
4942
- name: Autobuild
5043
uses: github/codeql-action/autobuild@v2
51-
5244
# ℹ️ Command-line programs to run using the OS shell.
5345
# 📚 https://git.io/JvXDl
5446

@@ -60,6 +52,9 @@ jobs:
6052
#- run: |
6153
# make bootstrap
6254
# make release
63-
6455
- name: Perform CodeQL Analysis
6556
uses: github/codeql-action/analyze@v2
57+
58+
concurrency:
59+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
60+
cancel-in-progress: true

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

+173
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
---
2+
name: deploy-hato-bot
3+
4+
on:
5+
release:
6+
types:
7+
- published
8+
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
- reopened
13+
- closed
14+
push:
15+
branches:
16+
- master
17+
- develop
18+
19+
jobs:
20+
deploy_docker_image:
21+
runs-on: ubuntu-latest
22+
env:
23+
DOCKER_BUILDKIT: 1
24+
COMPOSE_DOCKER_CLI_BUILD: 1
25+
REPOSITORY: ${{github.repository}}
26+
permissions:
27+
contents: read
28+
packages: write
29+
if: github.event_name == 'release' || (github.event_name == 'pull_request' && github.event.action != 'closed' && github.repository == github.event.pull_request.head.repo.full_name)
30+
steps:
31+
- uses: actions/checkout@v3.1.0
32+
with:
33+
fetch-depth: 0
34+
- name: Set .env
35+
run: cp .env.example .env
36+
- name: Login to GitHub Container Registry
37+
uses: docker/login-action@v2.1.0
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
- name: Set up QEMU
43+
uses: docker/setup-qemu-action@v2.1.0
44+
- name: Set up Docker Buildx
45+
id: buildx
46+
uses: docker/setup-buildx-action@v2.2.1
47+
- run: echo "TAG_NAME=${HEAD_REF//\//-}" >> "$GITHUB_ENV"
48+
env:
49+
HEAD_REF: ${{github.head_ref}}
50+
if: ${{ github.event_name == 'pull_request' }}
51+
- run: echo 'TAG_NAME=${{ github.event.release.tag_name }}' >> "$GITHUB_ENV"
52+
if: ${{ github.event_name == 'release' }}
53+
- name: Build and push (build)
54+
uses: docker/bake-action@v2.3.0
55+
env:
56+
DOCKER_CONTENT_TRUST: 1
57+
with:
58+
push: true
59+
files: build.docker-compose.yml
60+
- name: Build and push (main)
61+
uses: docker/bake-action@v2.3.0
62+
env:
63+
DOCKER_CONTENT_TRUST: 1
64+
with:
65+
push: true
66+
files: docker-compose.yml
67+
- name: Build and push (dev)
68+
uses: docker/bake-action@v2.3.0
69+
env:
70+
DOCKER_CONTENT_TRUST: 1
71+
with:
72+
push: true
73+
files: docker-compose.yml,dev.docker-compose.yml
74+
- run: echo 'TAG_NAME=latest' >> "$GITHUB_ENV"
75+
if: ${{ github.event_name == 'release' }}
76+
- name: Build and push (build) (latest)
77+
uses: docker/bake-action@v2.3.0
78+
if: ${{ github.event_name == 'release' }}
79+
env:
80+
DOCKER_CONTENT_TRUST: 1
81+
with:
82+
push: true
83+
files: build.docker-compose.yml
84+
- name: Build and push (main) (latest)
85+
uses: docker/bake-action@v2.3.0
86+
if: ${{ github.event_name == 'release' }}
87+
env:
88+
DOCKER_CONTENT_TRUST: 1
89+
with:
90+
push: true
91+
files: docker-compose.yml
92+
- name: Build and push (dev) (latest)
93+
uses: docker/bake-action@v2.3.0
94+
if: ${{ github.event_name == 'release' }}
95+
env:
96+
DOCKER_CONTENT_TRUST: 1
97+
with:
98+
push: true
99+
files: docker-compose.yml,dev.docker-compose.yml
100+
- name: Start docker
101+
env:
102+
DOCKER_CONTENT_TRUST: 1
103+
run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/deploy_docker_image/test.sh"
104+
105+
# .python-version をDockerイメージと同期させる
106+
update-version-python-version:
107+
runs-on: ubuntu-latest
108+
permissions:
109+
contents: write
110+
pull-requests: write
111+
env:
112+
DOCKER_CONTENT_TRUST: 1
113+
REPOSITORY: ${{github.repository}}
114+
needs: deploy_docker_image
115+
if: always() && (needs.deploy_docker_image.result == 'success' || (github.event_name == 'pull_request' && github.event.action == 'closed'))
116+
steps:
117+
- uses: actions/checkout@v3.1.0
118+
with:
119+
fetch-depth: 0
120+
ref: ${{ github.event.pull_request.head.sha }}
121+
- name: Get Python version
122+
id: get_python_version
123+
run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/update_version_python_version/get_python_version.sh"
124+
env:
125+
HEAD_REF: ${{github.head_ref}}
126+
- uses: dev-hato/actions-diff-pr-management@v1.1.1
127+
with:
128+
github-token: ${{secrets.GITHUB_TOKEN}}
129+
branch-name-prefix: fix-version-python-version
130+
pr-title-prefix: .python-versionを直してあげたよ!
131+
132+
update-dockle:
133+
runs-on: ubuntu-latest
134+
steps:
135+
- uses: actions/checkout@v3.1.0
136+
with:
137+
fetch-depth: 0
138+
ref: ${{ github.event.pull_request.head.sha }}
139+
- uses: dev-hato/actions-update-dockle@v0.0.33
140+
with:
141+
github-token: ${{secrets.GITHUB_TOKEN}}
142+
repo-name: dev-hato/hato-bot
143+
144+
dockle:
145+
runs-on: ubuntu-latest
146+
needs:
147+
- update-dockle
148+
- deploy_docker_image
149+
env:
150+
DOCKER_CONTENT_TRUST: 1
151+
REPOSITORY: ${{github.repository}}
152+
steps:
153+
- uses: actions/checkout@v3.1.0
154+
- run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/dockle/run_dockle.sh"
155+
env:
156+
HEAD_REF: ${{github.head_ref}}
157+
158+
deploy-complete:
159+
runs-on: ubuntu-latest
160+
if: always()
161+
needs:
162+
- update-version-python-version
163+
- update-dockle
164+
- dockle
165+
steps:
166+
- 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')))
167+
run: exit 0
168+
- 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')))) }}
169+
run: exit 1
170+
171+
concurrency:
172+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
173+
cancel-in-progress: true

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

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: format-json-yml
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- closed
10+
push:
11+
branches:
12+
- develop
13+
- master
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
jobs:
18+
format-json-yml:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3.1.0
22+
with:
23+
fetch-depth: 0
24+
ref: ${{ github.event.pull_request.head.sha }}
25+
- uses: dev-hato/actions-format-json-yml@v0.0.27
26+
with:
27+
github-token: ${{secrets.GITHUB_TOKEN}}
28+
repo-name: dev-hato/hato-bot
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
31+
cancel-in-progress: true

0 commit comments

Comments
 (0)