{"id":43916809,"url":"https://github.com/zooniverse/ci-cd","last_synced_at":"2026-02-06T21:34:46.001Z","repository":{"id":39623092,"uuid":"437075097","full_name":"zooniverse/ci-cd","owner":"zooniverse","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-06T23:55:44.000Z","size":110,"stargazers_count":0,"open_issues_count":10,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-10-07T00:20:42.061Z","etag":null,"topics":["actions","ci-cd","deployment","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zooniverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-10T18:20:33.000Z","updated_at":"2025-09-22T19:40:09.000Z","dependencies_parsed_at":"2024-03-12T21:25:59.760Z","dependency_job_id":"c6e048a2-18b6-4f1d-b4e7-eb5e8a8f077f","html_url":"https://github.com/zooniverse/ci-cd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zooniverse/ci-cd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zooniverse%2Fci-cd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zooniverse%2Fci-cd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zooniverse%2Fci-cd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zooniverse%2Fci-cd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zooniverse","download_url":"https://codeload.github.com/zooniverse/ci-cd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zooniverse%2Fci-cd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29177553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T20:14:21.878Z","status":"ssl_error","status_checked_at":"2026-02-06T20:14:21.443Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","ci-cd","deployment","hacktoberfest"],"created_at":"2026-02-06T21:34:45.930Z","updated_at":"2026-02-06T21:34:45.994Z","avatar_url":"https://github.com/zooniverse.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ci-cd\n\nThis repo houses the Zooniverse's shared CI/CD templates, actions, and workflows.\n\nMinimize ops \u0026 CI/CD code repetition and drift by calling these shared workflows from your repo. Use the latest version by specifying the `@main` tag, or pin to a specific commit or branch name.\n\n## Examples\n\n### Run RSpec tests in a Rails app:\n```yaml\nname: Run Rspec\n\non:\n  pull_request:\n  workflow_dispatch:\n\njobs:\n  run_rspec:\n    name: Run Rspec Tests\n    uses: zooniverse/ci-cd/.github/workflows/run_rspec.yaml@main\n    with:\n      db_name: app_db_test\n      ruby_version: 2.6.5\n```\n\n### Build and push a Docker image to GHCR\nThis is useful for ensuring that an image exists before a deploy \u0026 migrate. This example will build on every pull request update, but this workflow can also be used as a part of larger deploy jobs to avoid excessive building. You can also optionally add the `latest` tag (defaults to false) if you're updating on push to master. Extra build arguments can be specified with `build-args`, sent as a string.\n\n```yaml\nname: Build and Push Image\n\non:\n  pull_request:\n  workflow_dispatch:\n\njobs:\n  build_and_push_image:\n    name: Build and Push Image\n    uses: zooniverse/ci-cd/.github/workflows/build_and_push_image.yaml@main\n    with:\n      repo_name: education-api\n      commit_id: ${{ github.sha }}\n      latest: true\n      build_args: |\n        APP_ENV=staging\n```\n\n### Deploy a Rails app in Kubernetes\nThis is a staging deploy (push to master) that would likely also need a Docker build/push (above) and a database migration (below).\n```yaml\non:\n  push:\n    branches:\n      - master\n\n  deploy_staging:\n    name: Deploy to Staging\n    uses: zooniverse/ci-cd/.github/workflows/deploy_app.yaml@main\n    with:\n      app_name: myapp\n      repo_name: myapp\n      commit_id: ${{ github.sha }}\n      environment: staging\n    secrets:\n      creds: ${{ secrets.AZURE_AKS }}\n```\n\n### Build and deploy a static site\n```yaml\nname: Deploy App to Production\non:\n  # Run this workflow on push to production-release tag (via chatops)\n  push:\n    tags:\n      - production-release\n\njobs:\n  build:\n    uses: zooniverse/ci-cd/.github/workflows/npm_build.yaml@main\n    with:\n      commit_id: ${{ github.sha }}\n      node_version: '16.x'\n      # The name of the build artifact to store\n      output: 'dist'\n      # The name of the npm build script to run\n      script: '_build-production'\n  deploy:\n    name: Deploy production\n    uses: zooniverse/ci-cd/.github/workflows/deploy_static.yaml@main\n    needs: build\n    with:\n      # Retrieve the build artifact\n      source: 'dist'\n      target: 'myapp.zooniverse.org'\n    secrets:\n      creds: ${{ secrets.AZURE_STATIC_SITES }}\n```\n\n### Purge the Front Door cache for a specific AFD instance and content path\n```yaml\nname: Purge Star\non:\n  push:\n    tags:\n      - production-release\n\njobs:\n  purge_cached_star:\n    name: Purge cached file\n    uses: zooniverse/ci-cd/.github/workflows/purge_cache.yaml@main\n    with:\n      fdname: 'frontend-preview-zooniverse-org'\n      path: '/assets/star.jpg'\n    secrets:\n      creds: ${{ secrets.AZURE_STATIC_SITES }}\n```\n\n### Send a Slack notification\n```yaml\nslack_notification:\n  name: Send Slack notification\n  uses: zooniverse/ci-cd/.github/workflows/slack_notification.yaml@main\n  # The name of the job to be reported on, e.g. deploy, run_rspec\n  needs: deploy\n  if: always()\n  with:\n    commit_id: ${{ github.sha }}\n    # Use job name here also\n    job_name: Build production / build\n    status: ${{ needs.deploy.result }}\n    # Customize the slack message\n    title: 'My App Production deploy complete'\n    title_link: 'https://myapp.zooniverse.org'\n  secrets:\n    slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}\n```\n\n### Run something in a Kubernetes pod, like a Rails rake task or a migration\n\nThese require a corresponding Kubernetes template in the app's `/kubernetes` folder. This will instantiate a new Job pod with the same image as the current deployment. It will run the specified action and log the results in the runner's console. Use the Slack notification workflow above to report its status to chat. Azure credentials are required for these, as they manage these AKS deployments. In the case of a deploy, you can ensure a migration finishes successfully by including `needs: migration_step_name`.\n\nDB Migration:\n```yaml\nname: Production DB Migration\n\non:\n  push:\n    tags:\n      - production-release\n  workflow_dispatch:\n\njobs:\n  db_migration_production:\n    name: Production DB Migration\n    uses: zooniverse/ci-cd/.github/workflows/db_migration.yaml@main\n    # Ensure the deploy job successfully updates the deployment pod\n    needs: deploy_production\n    with:\n      app_name: myapp\n      environment: production\n      commit_id: ${{ github.sha }}\n    secrets:\n      creds: ${{ secrets.AZURE_AKS }}\n```\n\nRails/rake task with an input, manual only:\n```yaml\nname: Run Production Task\n\non:\n  workflow_dispatch:\n    inputs:\n      task:\n        description: Task to run\n        required: true\n        default: 'routes'\n\njobs:\n  run_production_task:\n    name: Run Production Task\n    uses: zooniverse/ci-cd/.github/workflows/run_task.yaml@main\n    with:\n      app_name: myapp\n      task_name: ${{ github.event.inputs.task }}\n      environment: production\n    secrets:\n      creds: ${{ secrets.AZURE_AKS }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzooniverse%2Fci-cd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzooniverse%2Fci-cd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzooniverse%2Fci-cd/lists"}