{"id":15099357,"url":"https://github.com/massdriver-cloud/actions","last_synced_at":"2025-04-14T23:32:11.033Z","repository":{"id":63976657,"uuid":"563590826","full_name":"massdriver-cloud/actions","owner":"massdriver-cloud","description":"Build and push images, patch and deploy your Massdriver applications using GitHub Actions.","archived":false,"fork":false,"pushed_at":"2024-12-09T07:45:07.000Z","size":3365,"stargazers_count":12,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-11T09:15:10.328Z","etag":null,"topics":["devops","github-actions","platform-engineering"],"latest_commit_sha":null,"homepage":"https://massdriver.cloud","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/massdriver-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-08T23:34:51.000Z","updated_at":"2024-11-08T18:27:10.000Z","dependencies_parsed_at":"2024-01-08T19:47:29.742Z","dependency_job_id":"f0500161-e309-4b63-bfcd-f9200a1b0013","html_url":"https://github.com/massdriver-cloud/actions","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Factions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Factions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Factions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Factions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/massdriver-cloud","download_url":"https://codeload.github.com/massdriver-cloud/actions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248978996,"owners_count":21192886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["devops","github-actions","platform-engineering"],"created_at":"2024-09-25T17:11:19.359Z","updated_at":"2025-04-14T23:32:11.027Z","avatar_url":"https://github.com/massdriver-cloud.png","language":"TypeScript","readme":"# Massdriver GitHub Actions\n\nA collection of GitHub Actions for interacting with [Massdriver](https://massdriver.cloud).\n\nPush images, patch, and deploy your applications with simple GH Workflows.\n\n## Usage Example\n\nBelow is an annotated, abridged version of how we deploy Massdriver using Massdriver.\n\n```yaml\nname: Deploy\n\non:\n  push:\n    branches: [main]\n\njobs:\n  Deploy:\n    runs-on: ubuntu-latest\n    env:\n      # Specify your Massdriver credentials as secrets.\n      # See https://docs.massdriver.cloud/cli/overview#setup\n      MASSDRIVER_API_KEY: ${{secrets.MASSDRIVER_API_KEY}}\n      MASSDRIVER_ORG_ID: ${{secrets.MASSDRIVER_ORGANIZATION_ID}}\n    steps:\n      # Check out the repo\n      - uses: actions/checkout@v3\n      # Sets up the Massdriver CLI on the runner.\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions/setup@v5\n      # Set up a container registry, \n      - name: Push Image\n        uses: massdriver-cloud/actions/image_push@v5\n        with:\n          namespace: 'massdriver-cloud'\n          image-name: 'massdriver'\n          # The ID of the Auth artifact to use.\n          # All artifacts can be found at https://app.massdriver.cloud/artifacts.\n          # For AWS, use `aws-iam-role`. GCP: `gcp-service-account``. Azure: `azure-service-principal``.\n          artifact: ${{secrets.ARTIFACT_ID}}\n          # The region in which the container registry resides. Cloud-specific.\n          region: 'us-west-2'\n          # We use the GH SHA as image tag.\n          image-tags: |\n            ${{github.sha}}\n            latest\n      # Uploads the bundle to Massdriver\n      - name: Publish Bundle\n        uses: massdriver-cloud/actions/bundle_publish@v5\n        with:\n          build-directory: ./bundle\n      # Once the application is deployed on Massdriver, app_patch can be used to update bundle parameters.\n      # Here, we're updating the image tag to the image we pushed in the `Push Image` step.\n      - name: Set Image Version\n        uses: massdriver-cloud/actions/app_patch@v5\n        with:\n          project: md\n          env: prod\n          manifest: massdriver\n          set: |\n            .image.tag = \"${{github.sha}}\"\n      # Deploys the updated application\n      - name: Deploy App\n        uses: massdriver-cloud/actions/app_deploy@v5\n        with:\n          project: md\n          env: prod\n          manifest: massdriver\n```\n\n## Quick Setup\n\nTo quickly add a basic GH workflow to your project, you can copy the [example workflow](example-workflow.yaml).\nIn the spirit of [release early, release often](https://en.wikipedia.org/wiki/Release_early,_release_often), the example deploys on every push to main, but can be easily adapted to your needs.\n\n### Configuration\n\nConfiguration is contained to the `env` block in the workflow:\n\n```yml\nenv:\n  # Massdriver Secrets\n  # These should be referencing encrypted GH secrets.\n  # For API_KEY and ORG_ID, see https://docs.massdriver.cloud/cli/overview#setup\n  MASSDRIVER_API_KEY: ${{secrets.MASSDRIVER_API_KEY}}\n  MASSDRIVER_ORG_ID: ${{secrets.MASSDRIVER_ORG_ID}}\n  # The Massdriver Artifact used to push the image.\n  # I.e. for AWS, this would reference an aws-iam-role that you've added as credentials to Massdriver.\n  MASSDRIVER_ARTIFACT_ID: ${{secrets.MASSDRIVER_ARTIFACT_ID}}\n  # Massdriver Package Variables\n  # Used to deploy the application. For more information, see https://docs.massdriver.cloud/applications/deploy\n  # The name of the project to which to deploy\n  MASSDRIVER_PROJECT: project\n  # The name of the environment (formerly target) to which to deploy\n  MASSDRIVER_ENVIRONMENT: prod\n  # The name of the manifest\n  MASSDRIVER_MANIFEST: x-app\n  # Registry Variables\n  # The namespace under which the registry should be created\n  REGISTRY_NAMESPACE: mycompany\n  # The name of the image within the registry\n  REGISTRY_IMAGE_NAME: x-app\n  # The region the registry should exist in.\n  # Note the spelling here is cloud-specific -\n  # `us-west-2` for AWS vs `westus2` for Azure.\n  REGISTRY_REGION: us-west-2\n  # Image Tag\n  # By default, we use the SHA of the commit.\n  IMAGE_TAG: ${{github.sha}}\n  # Local paths\n  # Specify the folder containing the bundle's massdriver.yaml.\n  BUNDLE_FOLDER: ./bundle\n```\n\n## Actions\n\n### Setup\n\nUse the root action to set up the [Massdriver CLI](https://github.com/massdriver-cloud/mass) for use in your workflows.\n\n```yaml\njobs:\n  massdriver:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions@v5\n      - name: Use Massdriver CLI\n        run: mass help\n```\n\nThis will download the latest version of the Massdriver CLI. Optionally, a `tag` may be specified to install a specific [tagged release](https://github.com/massdriver-cloud/mass/releases):\n\n```yaml\n- name: Install Massdriver CLI\n  uses: massdriver-cloud/actions/setup@v5\n  with:\n    tag: 1.0.0\n```\n\n### App Deploy\n\nDeploys a configured application to Massdriver.\n\n```yaml\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    env:\n      MASSDRIVER_API_KEY: ${{ secrets.MASSDRIVER_API_KEY }}\n      MASSDRIVER_ORG_ID: ${{ vars.MASSDRIVER_ORG_ID }}\n    steps:\n      - uses: actions/checkout@v3\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions@v5\n      - name: Deploy App\n        uses: massdriver-cloud/actions/app_deploy@v5\n        with:\n          project: ecomm\n          env: prod\n          manifest: db\n```\n\n### App Patch\n\nThis action will patch the parameters of an existing application.\n\n```yaml\njobs:\n  patch:\n    runs-on: ubuntu-latest\n    env:\n      MASSDRIVER_API_KEY: ${{ secrets.MASSDRIVER_API_KEY }}\n      MASSDRIVER_ORG_ID: ${{ vars.MASSDRIVER_ORG_ID }}\n    steps:\n      - uses: actions/checkout@v3\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions@v5\n      - name: Patch App\n        uses: massdriver-cloud/actions/app_patch@v5\n        with:\n          project: ecomm\n          env: prod\n          manifest: db\n          set: |\n            .image.repository = \"example/foo\"\n            .image.tag = \"v2\"\n```\n\n### Bundle Publish\n\nUse this action to publish a bundle to Massdriver:\n\n```yaml\njobs:\n  publish:\n    runs-on: ubuntu-latest\n    env:\n      MASSDRIVER_API_KEY: ${{ secrets.MASSDRIVER_API_KEY }}\n      MASSDRIVER_ORG_ID: ${{ vars.MASSDRIVER_ORG_ID }}\n    steps:\n      - uses: actions/checkout@v3\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions@v5\n      - name: Publish Bundle\n        uses: massdriver-cloud/actions/bundle_publish@v5\n```\n\n### Bundle Build\n\nUse this action to build schemas from massdriver.yaml:\n\n```yaml\njobs:\n  build:\n    runs-on: ubuntu-latest\n    env:\n      MASSDRIVER_API_KEY: ${{ secrets.MASSDRIVER_API_KEY }}\n      MASSDRIVER_ORG_ID: ${{ vars.MASSDRIVER_ORG_ID }}\n    steps:\n      - uses: actions/checkout@v3\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions@v5\n      - name: Build Bundle\n        uses: massdriver-cloud/actions/bundle_build@v5\n```\n\n### Image Push\n\nUse this action to push an image, using the Massdriver CLI, to any of the supported cloud providers.\n\n```yaml\njobs:\n  image_push:\n    runs-on: ubuntu-latest\n    env:\n      MASSDRIVER_API_KEY: ${{ secrets.MASSDRIVER_API_KEY }}\n      MASSDRIVER_ORG_ID: ${{ vars.MASSDRIVER_ORG_ID }}\n    steps:\n      - uses: actions/checkout@v3\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions@v5\n      - name: Push Image\n        uses: massdriver-cloud/actions/image_push@v5\n        with:\n          namespace: 'massdriver-cloud'\n          image-name: 'massdriver'\n          artifact: ${{ vars.MASSDRIVER_ARTIFACT_ID }}\n          region: 'us-west-2'\n```\n\n### Preview Deploy\n\nBefore setting up preview environments, you'll need to initialize your git repo with a `preview.json` file.\n\n```shell\nmass preview init\n```\n\nMake any edits to params that you need to set for your preview environment. This file supports interpolation of GH environment variables.\n\nAdd the file to your repo and commit it:\n\n```shell\ngit add preview.json\ngit commit -m \"Add preview.json\"\ngit push\n```\n\n[Learn more about preview environments.](https://docs.massdriver.cloud/cli/commands/mass_preview)\n\nUse this action to deploy preview environments for pull requests:\n\n```yaml\njobs:\n  preview:\n    runs-on: ubuntu-latest\n    env:\n      MASSDRIVER_API_KEY: ${{ secrets.MASSDRIVER_API_KEY }}\n      MASSDRIVER_ORG_ID: ${{ vars.MASSDRIVER_ORG_ID }}\n    steps:\n      - uses: actions/checkout@v4\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions@v5.1\n      - name: Deploy Preview\n        uses: massdriver-cloud/actions/preview_deploy@v5.1\n        with:\n          params: './preview.json'\n```\n\n### Preview Decommission\n\nUse this action to decommission preview environments when pull requests are closed:\n\n```yaml\njobs:\n  preview:\n    runs-on: ubuntu-latest\n    env:\n      MASSDRIVER_API_KEY: ${{ secrets.MASSDRIVER_API_KEY }}\n      MASSDRIVER_ORG_ID: ${{ vars.MASSDRIVER_ORG_ID }}\n    steps:\n      - uses: actions/checkout@v4\n      - name: Install Massdriver CLI\n        uses: massdriver-cloud/actions@v5.1\n      - name: Decommission Preview\n        uses: massdriver-cloud/actions/preview_decommission@v5.1\n        with:\n          params: './preview.json'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmassdriver-cloud%2Factions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmassdriver-cloud%2Factions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmassdriver-cloud%2Factions/lists"}