Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ updates:
directory: "/"
schedule:
interval: "weekly"
ignore:
- dependency-name: '*'
update-types:
# - version-update:semver-minor
- version-update:semver-patch
25 changes: 13 additions & 12 deletions .github/workflows/articles-changed-detection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ on:
pull_request:
paths:
# Since variables cannot be used in `on.paths`, this part must be hardcoded.
- "articles/changed-detenctions/**"
- ".github/workflows/articles-changed-detection.yaml"
- 'articles/changed-detections/**'
- '.github/workflows/articles-changed-detection.yaml'
workflow_dispatch:

permissions: {}
defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
TARGET_BASE_DIR: "articles/changed-detenctions"
TARGET_BASE_DIR: 'articles/changed-detections'

jobs:
detect-changes:
Expand Down Expand Up @@ -54,18 +54,19 @@ jobs:
run: |
# For manual execution (workflow_dispatch), target all projects under path/to/
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
PROJECTS=$(ls -d $TARGET_BASE_DIR/*/ | cut -d'/' -f3 | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "projects=$PROJECTS" >> $GITHUB_OUTPUT
PROJECTS=$(find "$TARGET_BASE_DIR" -mindepth 1 -maxdepth 1 -type d \
| cut -d'/' -f3 | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "projects=$PROJECTS" >> "$GITHUB_OUTPUT"
else
# json array returned from the plugin (e.g. ["path/to/AAA", "path/to/BBB"])
CHANGED_DIRS='${{ steps.changed-files.outputs.all_changed_files }}'

if [ "$CHANGED_DIRS" = "[]" ] || [ -z "$CHANGED_DIRS" ]; then
echo "projects=[]" >> $GITHUB_OUTPUT
echo "projects=[]" >> "$GITHUB_OUTPUT"
else
# Trim to "path/to/web" -> "web" instantly with jq
PROJECTS=$(echo "$CHANGED_DIRS" | jq -c 'map(split("/") | .[2])')
echo "projects=$PROJECTS" >> $GITHUB_OUTPUT
echo "projects=$PROJECTS" >> "$GITHUB_OUTPUT"
fi
fi

Expand All @@ -92,7 +93,7 @@ jobs:
echo "=========================================================="
echo "🚀 Processing Project: ${{ matrix.project }}"
echo "=========================================================="

- name: Find Target and Define Assets Path
run: |
# 1. First, search for the target
Expand All @@ -112,16 +113,16 @@ jobs:
PROJECT_ASSETS_PATH="${{ github.workspace }}/$TARGET_DIR/assets"

# Save each to environment variables
echo "TARGET_PATH=$TARGET" >> $GITHUB_ENV
echo "TEST_ASSETS_PATH=$PROJECT_ASSETS_PATH" >> $GITHUB_ENV
echo "TARGET_PATH=$TARGET" >> "$GITHUB_ENV"
echo "TEST_ASSETS_PATH=$PROJECT_ASSETS_PATH" >> "$GITHUB_ENV"

echo "🎯 Target detected: $TARGET"
echo "📂 Test assets will be generated at: $PROJECT_ASSETS_PATH"

- name: Build for ${{ matrix.project }}
run: |
echo ${{ env.TARGET_PATH }}

- name: Run Test Assets Scripts (If exists)
run: |
SCRIPT_PATH="$TARGET_BASE_DIR/${{ matrix.project }}/scripts/generate-test-assets.sh"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chapter-1-hello.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
branches:
- main
paths:
- './chapters/go/hello/**'
- 'chapters/go/hello/**'
- '.github/workflows/chapter-1-hello.yaml'

# issusのコメントでワークフローをトリガーする設定
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chapter-2-1-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches:
- main
paths:
- './chapters/go/hello-api/**'
- 'chapters/go/hello-api/**'
- '.github/workflows/chapter-2-1-ci.yaml'
workflow_dispatch:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/chapter-2-2-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches:
- main
paths:
- './chapters/go/hello-api/**'
- './.github/workflows/chapter-2-2-cd.yaml'
- 'chapters/go/hello-api/**'
- '.github/workflows/chapter-2-2-cd.yaml'
workflow_dispatch:

permissions: {}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/chapter-2-3-cd-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches:
- main
paths:
- './chapters/go/hello-api/**'
- './.github/workflows/chapter-2-3-cd-action.yaml'
- 'chapters/go/hello-api/**'
- '.github/workflows/chapter-2-3-cd-action.yaml'
workflow_dispatch:

permissions: {}
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/chapter-3-3-control-flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,22 @@ jobs:
run: |
echo "::notice::【手動テスト】ワークフローが正常に成功しました!"

echo "# 🟢 テスト成功通知" >> $GITHUB_STEP_SUMMARY
echo "手動実行されたジョブが正常に完了しました。" >> $GITHUB_STEP_SUMMARY
echo "- **ステータス:** SUCCESS" >> $GITHUB_STEP_SUMMARY
echo "- [ログを確認する](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
{
echo "# 🟢 テスト成功通知"
echo "手動実行されたジョブが正常に完了しました。"
echo "- **ステータス:** SUCCESS"
echo "- [ログを確認する](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
} >> "$GITHUB_STEP_SUMMARY"

# 【失敗(赤)のときの通知】
- name: Notify on Failure
if: ${{ needs.build.result == 'failure' }}
run: |
echo "::error::【手動テスト】ワークフローが失敗しました。確認してください!"

echo "# ❌ テストエラー通知" >> $GITHUB_STEP_SUMMARY
echo "手動実行されたジョブでエラーを検知しました。" >> $GITHUB_STEP_SUMMARY
echo "- **ステータス:** FAILURE" >> $GITHUB_STEP_SUMMARY
echo "- [ログを確認する](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
{
echo "# ❌ テストエラー通知"
echo "手動実行されたジョブでエラーを検知しました。"
echo "- **ステータス:** FAILURE"
echo "- [ログを確認する](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
} >> "$GITHUB_STEP_SUMMARY"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
# 特定のファイルが変更されたときにトリガーする
paths:
- '.github/workflows/chapter-3-5-trigger.yaml'
- '.github/workflows/chapter-3-5-triggers.yaml'
push:
# 特定のブランチに push したときにトリガーする
branches:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/chapter-5-1-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ name: Chapter 5 - E2E test (Call)
on:
pull_request:
paths:
- ".github/workflows/e2e-test.yaml"
- ".github/workflows/reusable-e2e-test.yaml"
- ".github/actions/setup-playwright/action.yaml"
- "packages/e2e/**"
- '.github/workflows/e2e-test.yaml'
- '.github/workflows/reusable-e2e-test.yaml'
- '.github/actions/setup-playwright/action.yaml'
- 'packages/e2e/**'
workflow_dispatch:

permissions: {}
Expand All @@ -17,6 +17,6 @@ jobs:
e2e:
permissions:
contents: read
uses: ./.github/workflows/reusable-e2e-test.yaml
uses: ./.github/workflows/chapter-5-1-reusable-e2e-test.yaml
with:
working-directory: "packages/e2e"
working-directory: 'packages/e2e'
8 changes: 4 additions & 4 deletions .github/workflows/ex-11-good-practices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
workflow_dispatch:
# 5. 不要なイベントで起動しないようにフィルタリングする
pull_request:
paths:
- ".github/workflows/ex-11-good-practices.yaml"
paths:
- '.github/workflows/ex-11-good-practices.yaml'

# ワークフローレベルでパーミッションをすべて無効化
permissions: {}
Expand All @@ -40,11 +40,11 @@ jobs:
steps:
# 8. アクションはコミットハッシュで固定する
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# 9. Bashトレーシングオプションでログを詳細に出力する(ログに表示されている気がする)
# 3.「actionlint」ですばやく構文エラーをチェックする
- name: Run actionlint
run: |
set -x
docker run --rm -v "$(pwd):$(pwd)" -w "$(pwd)" rhysd/actionlint:1.7.3
docker run --rm -v "$(pwd):$(pwd)" -w "$(pwd)" rhysd/actionlint:1.7.12
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ bin/
.nuget/
**/dotnet/runfile-discovery/
**/cache.staging.json
.DS_Store
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Categoty 1
# Category 1

update at: 2026-07-16 21:47
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Categoty 3
# # Category 2

update at: 2026-07-16 21:47
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Categoty 1
# Category 3

update at: 2026-07-16 21:47
Loading