Composite actions for common CI/CD tasks at 84codes.
Working at 84codes? Please note that this repository is public!
Sets up everything needed for Ruby CI: PostgreSQL, LavinMQ, and Ruby environment.
- uses: 84codes/actions/ruby-ci-setup@main
with:
postgres: true
lavinmq: true
github-token: ${{ secrets.GITHUB_TOKEN }}Run Ruby test commands in your workflow.
- uses: 84codes/actions/ruby-test-step@main
with:
run: bundle exec rake testRun RuboCop linting with reviewdog (assumes Ruby is already set up).
- uses: 84codes/actions/rubocop-lint@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}Deploy a built static site to an S3-backed CloudFront preview at https://pr-<N>.<domain>. Used by the lavinmq, cloudamqp, and 84codes website repos.
- uses: 84codes/actions/site-preview@main
with:
pr-number: ${{ github.event.pull_request.number }}
commit-sha: ${{ github.event.pull_request.head.sha }}
domain: example.dev
cloudfront-distribution-id: EXAMPLEDIST12345
csp-policy-name: example-preview-csp-policy
github-token: ${{ secrets.GITHUB_TOKEN }}Tear down a PR preview: delete the S3 bucket, deactivate the GitHub deployment, comment on the PR.
- uses: 84codes/actions/site-preview/cleanup@main
with:
pr-number: ${{ github.event.pull_request.number }}
domain: example.dev
github-token: ${{ secrets.GITHUB_TOKEN }}Periodic safety net: delete preview buckets older than the cutoff so closed-without-cleanup previews don't accumulate.
- uses: 84codes/actions/site-preview/prune-orphaned@main
with:
domain: example.devname: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
steps:
# Setup Ruby environment with PostgreSQL
- uses: 84codes/actions/ruby-ci-setup@main
with:
postgres: true
github-token: ${{ secrets.GITHUB_TOKEN }}
# Run tests
- uses: 84codes/actions/ruby-test-step@main
with:
run: bundle exec rake test
# Run linting
- uses: 84codes/actions/rubocop-lint@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}