β chore: Bump wgtechlabs/container-build-flow-action from 1.7.0 to 1.7.1 #217
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main, dev] | |
| push: | |
| branches: [main, dev] | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| commits: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Validate commit messages | |
| run: | | |
| # Clean Commit convention pattern | |
| # Format: <emoji> <type>[(<scope>)]: <description> | |
| PATTERN='^(π¦|π§|ποΈ|π|βοΈ|β|π§ͺ|π|π) (new|update|remove|security|setup|chore|test|docs|release)( \([a-z0-9][a-z0-9-]*\))?: .{1,72}$' | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| COMMITS=$(git log --format="%s" "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}") | |
| else | |
| GITHUB_EVENT_BEFORE="${{ github.event.before }}" | |
| GITHUB_EVENT_AFTER="${{ github.event.after }}" | |
| if [ "$GITHUB_EVENT_BEFORE" = "0000000000000000000000000000000000000000" ]; then | |
| # Initial push has no valid "before" SHA, so capture all reachable commits | |
| COMMITS=$(git log --format="%s" "$GITHUB_EVENT_AFTER") | |
| elif ! git cat-file -e "${GITHUB_EVENT_BEFORE}^{commit}" 2>/dev/null; then | |
| # Force-push: before SHA no longer exists, validate only the latest commit | |
| echo "β Force-push detected β before SHA not found, validating HEAD commit only" | |
| COMMITS=$(git log --format="%s" -1 "$GITHUB_EVENT_AFTER") | |
| else | |
| COMMITS=$(git log --format="%s" "${GITHUB_EVENT_BEFORE}..${GITHUB_EVENT_AFTER}") | |
| fi | |
| fi | |
| FAILED=0 | |
| while IFS= read -r msg; do | |
| [ -z "$msg" ] && continue | |
| # Allow merge commits | |
| if echo "$msg" | grep -qE "^Merge "; then | |
| continue | |
| fi | |
| # Allow Copilot agent initial plan commits (auto-generated before repo conventions are read) | |
| if echo "$msg" | grep -qE "^Initial plan$"; then | |
| echo "β Skipping bot commit: $msg" | |
| continue | |
| fi | |
| if ! echo "$msg" | grep -qP "$PATTERN"; then | |
| echo "β Invalid commit message: $msg" | |
| FAILED=1 | |
| else | |
| echo "β Valid commit message: $msg" | |
| fi | |
| done <<< "$COMMITS" | |
| if [ "$FAILED" -eq 1 ]; then | |
| echo "" | |
| echo "One or more commit messages do not follow the Clean Commit convention." | |
| echo "Format: <emoji> <type>[(<scope>)]: <description>" | |
| echo "Reference: https://github.com/wgtechlabs/clean-commit" | |
| exit 1 | |
| fi | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run Biome lint and format check | |
| run: bun run lint | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build packages | |
| run: bun run build:packages | |
| - name: Build plugins | |
| run: bun run build:plugins | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build packages | |
| run: bun run build:packages | |
| - name: Build plugins | |
| run: bun run build:plugins | |
| - name: Run tests (with retry for Bun runtime segfaults) | |
| uses: nick-fields/retry@v4 | |
| with: | |
| max_attempts: 3 | |
| timeout_minutes: 10 | |
| command: bun test |