Skip to content

ci: upgrade GitHub Actions versions and require CI before deployment#221

Merged
hoiekim merged 1 commit intohoiekim:mainfrom
moltboie:chore/ci-cd-action-upgrades
Mar 30, 2026
Merged

ci: upgrade GitHub Actions versions and require CI before deployment#221
hoiekim merged 1 commit intohoiekim:mainfrom
moltboie:chore/ci-cd-action-upgrades

Conversation

@moltboie
Copy link
Copy Markdown
Contributor

Changes

Action version upgrades (Closes #216)

  • actions/checkout@v3@v4 (eliminates Node 16 EOL warnings)
  • oven-sh/setup-bun@v1@v2
  • docker/setup-buildx-action@v2@v3
  • docker/login-action@v2@v3
  • docker/build-push-action@v3@v6

CD now requires CI to pass (Closes #218)

Changed CD trigger from push: branches: [main] to workflow_run on CI:

on:
  workflow_run:
    workflows: ["CI"]
    types: [completed]
    branches: [main]
  • CD only starts when CI completes successfully (conclusion == 'success')
  • CI workflow now also runs on push: branches: [main] (needed to fire the workflow_run event for CD)
  • Uses workflow_run.head_sha for Docker image checkout/tagging

Before/After

Before: Every push to main deployed immediately — CI could be failing.
After: Deploy only happens after CI tests + build pass on that commit.

Testing

  • Workflow YAML is syntactically valid
  • Action version bumps are the official current majors per GitHub Marketplace

Copy link
Copy Markdown
Contributor Author

@moltboie moltboie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-Review

Discussion thread status:

  • No prior thread.

Checked:

  • Logic — CD now gates on CI success via workflow_run. Correct: CI must pass before deployment triggers. check-secrets job guards against missing secrets gracefully.
  • Types — YAML only. No type concerns.
  • Quality — Clean upgrade: checkout@v3→v4, setup-bun@v1→v2, buildx@v2→v3, login@v2→v3, build-push@v3→v6. All to current major versions.
  • Maintainability — Standard CI/CD pattern. workflow_run + head_sha checkout is the correct pattern for secrets-enabled deployments triggered by CI.
  • Security — Using ref: github.event.workflow_run.head_sha is correct for workflow_run triggers — ensures the right commit is checked out. Secrets are only exposed in the base repo context (not forks), which is the safe behavior.
  • Tests — N/A for CI config.
  • Blockers — None.

E2E Testing:

  • Merge to main will trigger CI then CD automatically.

Issues found:

  • None.

Confidence: High

Comment thread .github/workflows/cd.yml Outdated
@moltboie
Copy link
Copy Markdown
Contributor Author

Rebased on main.

Comment thread .github/workflows/ci.yml Outdated
@moltboie
Copy link
Copy Markdown
Contributor Author

Rebased on main.

@moltboie moltboie force-pushed the chore/ci-cd-action-upgrades branch 2 times, most recently from d3083bd to 5661da9 Compare March 30, 2026 02:44
- checkout@v3 → @v4
- setup-bun@v1 → @v2
- setup-buildx-action@v2 → @V3
- login-action@v2 → @V3
- build-push-action@v3 → @v6

Remove push:branches trigger from CI — redundant since CD already
runs all checks on push to main.

Closes hoiekim#216
Closes hoiekim#218
@moltboie moltboie force-pushed the chore/ci-cd-action-upgrades branch from 5661da9 to 6976482 Compare March 30, 2026 02:51
@hoiekim hoiekim merged commit a5f790d into hoiekim:main Mar 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: CD pipeline deploys without requiring CI to pass ci: upgrade GitHub Actions to current major versions

2 participants