Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

118 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reusable GitHub Actions for 84codes

Composite actions for common CI/CD tasks at 84codes.

Working at 84codes? Please note that this repository is public!


Available Actions

Ruby CI Setup (ruby-ci-setup)

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 }}

Read more →

Ruby Test Step (ruby-test-step)

Run Ruby test commands in your workflow.

- uses: 84codes/actions/ruby-test-step@main
  with:
    run: bundle exec rake test

Read more →

RuboCop Lint (rubocop-lint)

Run RuboCop linting (assumes Ruby is already set up).

- uses: 84codes/actions/rubocop-lint@main

Read more →

Site Preview Deploy (site-preview)

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 }}

Read more →

Site Preview Cleanup (site-preview/cleanup)

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 }}

Read more →

Site Preview Prune Orphaned (site-preview/prune-orphaned)

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.dev

Read more →


Example: Complete Ruby CI Workflow

name: 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

About

Reusable workflows for GitHub Actions

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages