Skip to content

ci: deploy from GitHub Actions through OIDC - #4

Merged
dhamsey3 merged 1 commit into
mainfrom
feat/deploy-from-ci
Oct 15, 2026
Merged

dhamsey3 merged 1 commit into
mainfrom
feat/deploy-from-ci

Conversation

@dhamsey3

Copy link
Copy Markdown
Owner

First half of roadmap phase 2: deploys run from GitHub Actions instead of a laptop.

What changes

  • .github/workflows/deploy.yml: pull requests that touch src/, infrastructure/, requirements-lambda.txt, Makefile or the workflow itself run make plan and put the plan in the run summary. On main the workflow plans again and applies, stamping the Lambda with the merge commit's SHA. workflow_dispatch re-deploys main.
  • AWS access is GitHub OIDC, with no stored keys. Pull requests assume github-actions-voltcast-plan (read-only, plans with -lock=false). Only main can assume github-actions-voltcast-apply. Both roles are in aws-oidc-bootstrap, scoped to voltcast-* resources. The read list comes from a TF_LOG=debug plan against the live stack. Both policies were checked with the IAM policy simulator (68 allow/deny cases each) and Access Analyzer. The apply role can't create or delete the KMS data key.
  • Guard: the workflow fails if the ALERT_EMAIL secret is missing, because an empty alert_email would plan the alert subscription away.
  • alert_email is now sensitive, so the address stays out of the public Actions logs.
  • README: Deploy section and roadmap updated.

Config (already set)

Repository variables AWS_PLAN_ROLE_ARN, AWS_APPLY_ROLE_ARN, AWS_REGION, TF_STATE_BUCKET, TF_STATE_LOCK_TABLE, and the ALERT_EMAIL secret.

Expected plan on this PR

  • aws_lambda_function.pipeline: in-place update of CODE_VERSION, and possibly the code hash if the CI-built zip differs byte-wise from the local build.
  • aws_sns_topic_subscription.email[0]: in-place, sensitivity marking only (value unchanged, no API change).
  • Nothing added or destroyed.

Pull requests that touch the code or the infrastructure run `make plan`
with a read-only role and put the plan in the run summary. Merges to main
plan and apply with the apply role, which only main can assume. Both roles
live in aws-oidc-bootstrap; there are no stored AWS keys.

The workflow refuses to run without the ALERT_EMAIL secret, since an empty
alert_email would plan the alert subscription away. alert_email is now
sensitive, so the address stays out of the public Actions logs.
@dhamsey3
dhamsey3 merged commit 021aab5 into main Oct 15, 2026
4 of 5 checks passed
@dhamsey3
dhamsey3 deleted the feat/deploy-from-ci branch October 16, 2026 00:15
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.

1 participant