Skip to content

ci: add test and container deploy workflow#3

Merged
jordangarrison merged 3 commits intomainfrom
ci-pipeline
Feb 20, 2026
Merged

ci: add test and container deploy workflow#3
jordangarrison merged 3 commits intomainfrom
ci-pipeline

Conversation

@jordangarrison
Copy link
Copy Markdown
Owner

@jordangarrison jordangarrison commented Feb 19, 2026

Summary

  • Add .github/workflows/ci.yml with two jobs: test and deploy
  • Test job runs on all PRs and pushes to main — installs Nix, runs mix deps.get, mix format --check-formatted, and mix test
  • Deploy job runs only on pushes to main after tests pass — builds the Nix OCI image, tags it with latest and the 7-char commit SHA, and pushes both to ghcr.io/jordangarrison/greenlight
  • Uses DeterminateSystems/nix-installer-action@v21 and magic-nix-cache-action@v13 for fast Nix setup with caching
  • Adds concurrency control to cancel redundant in-progress runs on the same branch
  • Uses GITHUB_TOKEN for GHCR authentication (no additional secrets needed)

Test plan

  • PR triggers the test job and it passes
  • deploy job does not run on the PR (only on pushes to main)
  • After merging, deploy job runs and pushes image to GHCR with both latest and SHA tags

- Pin DeterminateSystems/nix-installer-action to v21
- Pin DeterminateSystems/magic-nix-cache-action to v13
- Pin actions/checkout to v6
- Add concurrency group to cancel redundant PR runs
- Add mix format --check-formatted to test job
- Add set -euo pipefail to deploy shell block
- Quote SHA-interpolated image references
- Use ./result explicit path for docker load
@jordangarrison jordangarrison merged commit 8214a2d into main Feb 20, 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.

1 participant