{"id":23490076,"url":"https://github.com/joggrdocs/delphi","last_synced_at":"2025-04-14T15:41:37.578Z","repository":{"id":37828539,"uuid":"391723917","full_name":"joggrdocs/delphi","owner":"joggrdocs","description":"GitHub Action for deploying preview environments.","archived":false,"fork":false,"pushed_at":"2024-03-20T22:56:48.000Z","size":2588,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-20T23:52:43.069Z","etag":null,"topics":["actions","github-actions","previews"],"latest_commit_sha":null,"homepage":"","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/joggrdocs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2021-08-01T19:51:40.000Z","updated_at":"2024-07-12T18:24:31.513Z","dependencies_parsed_at":"2024-01-22T19:21:21.849Z","dependency_job_id":"684a1601-9d35-47b0-baf4-11ee4525efd3","html_url":"https://github.com/joggrdocs/delphi","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"37f52735ab67108c7bebb74e16d972e647eeb898"},"previous_names":["codereviewsai/previews","joggrdocs/delphi","joggrdocs/previews"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joggrdocs%2Fdelphi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joggrdocs%2Fdelphi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joggrdocs%2Fdelphi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joggrdocs%2Fdelphi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joggrdocs","download_url":"https://codeload.github.com/joggrdocs/delphi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248907927,"owners_count":21181433,"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":["actions","github-actions","previews"],"created_at":"2024-12-25T00:15:49.356Z","updated_at":"2025-04-14T15:41:37.571Z","avatar_url":"https://github.com/joggrdocs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv\u003e\n    \u003cp align=\"center\"\u003e\n        \u003cimg src=\"/.github/assets/logo.png\" align=\"center\" width=\"280\" /\u003e\n    \u003c/p\u003e\n    \u003chr\u003e\n    \u003cblockquote align=\"center\"\u003e\n        \"Know thyself... before deploying to production\" - The DevOps Oracle of Delphi\n    \u003c/blockquote\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/joggrdocs/delphi/actions/workflows/codeql-analysis.yml\"\u003e\n    \u003cimg alt=\"CodeQL\" src=\"https://github.com/joggrdocs/delphi/actions/workflows/codeql-analysis.yml/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/github/v/release/joggrdocs/delphi\"\u003e\n    \u003cimg alt=\"GitHub Release\" src=\"https://img.shields.io/github/v/release/joggrdocs/delphi\"\u003e\n  \u003c/a\u003e\n  \u003cbr/\u003e\n\u003c/p\u003e\n\nPreview environments for every Pull Request.\n\n## Usage\n\n```yaml\nname: \"Preview Environments\"\non:\n  pull_request:\n    types: [labeled, synchronize, opened, reopened]\n    branches:\n      - main\njobs:\n  previews:\n    name: \"🔮 Previews\"\n    runs-on: ubuntu-latest\n    if: contains(github.event.pull_request.labels.*.name, 'preview')\n    steps:\n      - name: Checkout Code\n        uses: actions/checkout@v1\n      - name: \"🔮 Launch Preview Environment\"\n        uses: joggrdocs/delphi@v1\n        with:\n          name: my-application\n          gcp_service_account_key: ${{ secrets.PREVIEWS_SERVICE_ACCOUNT_KEY }}\n          gcp_project_id: ${{ vars.GCP_PROJECT_ID_PREVIEWS }}\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          gcp_artifact_repository: ${{ vars.GCP_ARTIFACT_REGISTRY_PREVIEWS }}\n```\n\n## API Documentation\n\n\u003c!-- docs:start --\u003e\n### Inputs\n\n| Field | Required | Description | Default |\n| ----- | -------- | ----------- | ------- |\n| name | yes | The name of the service (must be unique) to be deployed. This cannot exceed 24 characters | - |\n| gcp_service_account_key | yes | The Service Account JSON Key used to push images to the GCP Artifact Registry. | - |\n| gcp_artifact_repository | yes | The Artifact Registry name, you can override for custom names (i.e. the 'acme' in us-docker.pkg.dev/able-sailor-21423/acme) | - |\n| github_token | yes | Github Token, pass in the `secrets.GITHUB_TOKEN`. | - |\n| port | no | The port that the application will run on in the container. | 8080 |\n| service_account | no | The service account to be used for the Cloud Run service. | - |\n| env_vars | no | List of environment variables that will be injected during runtime, each on a new line. | - |\n| secrets | no | List of secrets that will be injected during runtime, each on a new line. | - |\n| flags | no | List of flags that will be injected during runtime. | - |\n| gcp_region | no | The GCP Region where the service will be deployed. | us-central1 |\n| gcp_project_id | no | The GCP Project ID where the service will be deployed. | - |\n| gcp_tag | no | A tag to be applied to the Cloud Run service, used for ingress or other permissions. | - |\n| docker_file_name | no | The Dockerfile name, you can override for custom names (i.e. DevDockerfile) | Dockerfile |\n| docker_directory | no | Directory where the DockerFile is located. | . |\n| docker_build_args | no | Comma separated list of arguments that will be injected during the build, each on a new line. | - |\n\n### Outputs\n\n| Field | Description |\n| ----- | ----------- |\n| url | The preview URL for the running application |\n\n\u003c!-- docs:end --\u003e\n\n## Examples\n\n### Full Example\n\nThis example includes all the bells and whistles.\n\n```yaml\nname: \"Preview Environments\"\n\non:\n  pull_request:\n    types: [labeled, synchronize, opened, reopened]\n    branches:\n      - main\n\njobs:\n  previews:\n    name: \"🔮 Previews\"\n    runs-on: ubuntu-latest\n    if: contains(github.event.pull_request.labels.*.name, 'preview')\n    steps:\n      - name: Checkout Code\n        uses: actions/checkout@v1\n      - id: preview\n        name: \"🔮 Launch Preview Environment\"\n        uses: joggrdocs/delphi@v1\n        with:\n          # The name of your application (must be unique)\n          name: my-application\n\n          # (optional) The port your application is running on, defaults to 8080\n          port: 8080\n\n          # (Optional) Environment Variables that will be injected during runtime\n          env_vars: |\n            FOO=bar\n            BAR=foo\n\n          # (Optional) Secrets that will be injected during runtime from GCP Secret Manager\n          secrets: |\n            MY_SECRET=my-secret:latest\n            ANOTHER_SECRET=another-secret:latest\n\n          # The GCP Service Account Key, used to authenticate with GCP\n          gcp_service_account_key: ${{ secrets.PREVIEWS_SERVICE_ACCOUNT_KEY }}\n\n          # The GCP Project ID\n          gcp_project_id: ${{ vars.GCP_PROJECT_ID }}\n\n          # (optional) The GCP Region, defaults to us-central1\n          gcp_region: ${{ vars.GCP_REGION }}\n\n          # (optional) The GCP Artifact Registry, where the Docker image will be stored\n          gcp_artifact_repository: ${{ vars.GCP_ARTIFACT_REPOSITORY }}\n\n          # Default token for the repository\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n\n          # (Optional) A directory containing a Dockerfile\n          docker_directory: ./examples/nodejs-simple\n\n          # (Optional) The Dockerfile name, you can override for custom names (i.e. DevDockerfile)\n          docker_file_name: DevDockerfile\n\n          # (Optional) Docker Build Arguments (i.e. --build-args) that will be injected during the build\n          docker_build_args: FOO=bar,BAR=foo\n```\n\n### Basic Example\n\nThis is the minimal code you will need to set up previews.\n\n```yaml\nname: \"Preview Environments\"\n\non:\n  pull_request:\n    types: [labeled, synchronize, opened, reopened]\n    branches:\n      - main\n\njobs:\n  previews:\n    name: \"🔮 Previews\"\n    runs-on: ubuntu-latest\n    if: contains(github.event.pull_request.labels.*.name, 'preview')\n    steps:\n      - name: Checkout Code\n        uses: actions/checkout@v1\n      - id: preview\n        name: \"🔮 Launch Preview Environment\"\n        uses: joggrdocs/delphi@v1\n        with:\n          # The name of your application (must be unique)\n          name: my-application\n\n          # The GCP Service Account Key, used to authenticate with GCP\n          gcp_service_account_key: ${{ secrets.PREVIEWS_SERVICE_ACCOUNT_KEY }}\n\n          # The GCP Project ID\n          gcp_project_id: ${{ vars.GCP_PROJECT_ID }}\n\n          # Default token for the repository\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Slack Notification\n\n```yaml\nname: \"Preview Environments\"\n\non:\n  pull_request:\n    types: [labeled, synchronize, opened, reopened]\n    branches:\n      - main\n\njobs:\n  previews:\n    name: \"🔮 Previews\"\n    runs-on: ubuntu-latest\n    if: contains(github.event.pull_request.labels.*.name, 'preview')\n    steps:\n      - name: Checkout Code\n        uses: actions/checkout@v1\n      - id: preview\n        name: \"🔮 Launch Preview Environment\"\n        uses: joggrdocs/delphi@v1\n        with:\n          name: my-application\n          gcp_service_account_key: ${{ secrets.PREVIEWS_SERVICE_ACCOUNT_KEY }}\n          gcp_project_id: ${{ vars.GCP_PROJECT_ID }}\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n      - name: Send Slack Notification\n        id: slack\n        uses: slackapi/slack-github-action@v1.25.0\n        with:\n          # For posting a rich message using Block Kit https://app.slack.com/block-kit-builder\n          payload: |\n            {\n              \"text\": \"New Preview \u003chttps://github.com/${{ github.repository }|${{ github.repository }}\u003e for \u003chttps://github.com/${{ github.repository }}/pull/${{ github.event.number }}|PR#${{ github.event.number }}\u003e\",\n              \"blocks\": [\n                {\n                  \"type\": \"section\",\n                  \"text\": {\n                    \"type\": \"mrkdwn\",\n                    \"text\": \"New Preview \u003chttps://github.com/${{ github.repository }|${{ github.repository }}\u003e for \u003chttps://github.com/${{ github.repository }}/pull/${{ github.event.number }}|PR#${{ github.event.number }}\u003e by \u003chttps://github.com/${{ github.actor }}/@${{ github.actor }}\u003e\"\n                  }\n                },\n                {\n                  \"type\": \"divider\"\n                },\n                { \n                  \"type\": \"actions\",\n                  \"elements\": [\n                    {\n                      \"type\": \"button\",\n                      \"text\": {\n                        \"type\": \"plain_text\",\n                        \"text\": \"View Preview\",\n                        \"emoji\": true\n                      },\n                      \"value\": \"view-runs\",\n                      \"url\": \"${{ steps.preview.outputs.url }}\",\n                      \"action_id\": \"view-preview-action\"\n                    }\n                  ]\n                }\n              ]\n            }\n        env:\n          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}\n          SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK\n```\n\n## License\n\nLicensed under MIT.\n\n\u003cbr\u003e\n\u003chr\u003e\n\u003ch2 align=\"center\"\u003e\n\nWant to sign up for Joggr? Check us out at \u003ca href=\"https://joggr.io\"\u003eJoggr\u003c/a\u003e\n\n\u003c/h2\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoggrdocs%2Fdelphi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoggrdocs%2Fdelphi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoggrdocs%2Fdelphi/lists"}