{"id":20243976,"url":"https://github.com/wille/review-app-action","last_synced_at":"2026-05-06T09:38:29.918Z","repository":{"id":246918382,"uuid":"823144967","full_name":"wille/review-app-action","owner":"wille","description":"Github Action for Review App Operator","archived":false,"fork":false,"pushed_at":"2024-08-25T13:58:23.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T01:45:10.537Z","etag":null,"topics":["continuous-delivery","continuous-deployment","continuous-integration","github-actions","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/wille.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}},"created_at":"2024-07-02T13:37:55.000Z","updated_at":"2024-08-25T13:58:26.000Z","dependencies_parsed_at":"2024-07-10T01:42:18.628Z","dependency_job_id":"fb20f3b6-2897-4d90-864a-8b5f6079f4f2","html_url":"https://github.com/wille/review-app-action","commit_stats":null,"previous_names":["wille/review-app-operator-action","wille/review-app-action"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wille%2Freview-app-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wille%2Freview-app-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wille%2Freview-app-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wille%2Freview-app-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wille","download_url":"https://codeload.github.com/wille/review-app-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241687386,"owners_count":20003233,"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":["continuous-delivery","continuous-deployment","continuous-integration","github-actions","kubernetes"],"created_at":"2024-11-14T09:10:56.642Z","updated_at":"2026-05-06T09:38:24.894Z","avatar_url":"https://github.com/wille.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub release](https://img.shields.io/github/release/wille/review-app-action.svg?style=flat-square)](https://github.com/wille/review-app-action/releases/latest)\n\n# Review App Action\n\nA Github Action to be used with [Review App Operator](https://github.com/wille/review-app-operator) to create staging/preview environments for pull requests.\n\nPrerequisites:\n- A Kubernetes cluster with Review App Operator installed and configured correctly\n- A `ReviewApp` resource in the cluster\n- Docker registry to push images from your workflow to your cluster pull and run\n- A webhook URL to the Review App Operator, same as `webhook.ingress.host` in the Operator configuration\n- The action secret `REVIEW_APP_WEBHOOK_SECRET` must be set to the same value as the `webhook.secret` the Operator configuration.\n\n## Usage\n\nBelow is an example workflow to build, push and deploy a Docker image to a Kubernetes cluster using the Review App Operator.\n\n## Workflow to create a review app for a pull request\n\n\n### `.github/workflows/pull_request.yml`\n\n```yaml\nname: Pull Request\n\non:\n  pull_request:\n    types:\n      - opened\n      - synchronize\n      - reopened\n\nconcurrency:\n  group: review-app-${{ github.head_ref }}\n  cancel-in-progress: false\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7\n\n      # Create a pending deployment on the Pull Request page\n      - name: Create Github deployment\n        uses: bobheadxi/deployments@88ce5600046c82542f8246ac287d0a53c461bca3\n        id: create_deployment\n        with:\n          step: start\n          token: ${{ secrets.GITHUB_TOKEN }}\n          env: ${{ github.head_ref }}\n          ref: ${{ github.head_ref }}\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.REGISTRY_USER }}\n          password: ${{ secrets.REGISTRY_TOKEN }}\n\n      - name: Build and push\n        uses: docker/build-push-action@v6\n        with:\n          push: true\n          # Tags the new image with the commit hash and the branch name\n          tags: |\n            user/app:${{ github.event.pull_request.head.sha }}\n\n      - name: Deploy\n        id: deploy\n        uses: wille/review-app-action@master\n        with:\n          review_app_name: my-reviewapp\n          review_app_namespace: staging\n          webhook_url: https://review-app-operator-webhooks.example.com\n          webhook_secret: ${{ secrets.REVIEW_APP_WEBHOOK_SECRET }}\n          image: user/app:${{ github.event.pull_request.head.sha }}@sha256:${{ steps.build.outputs.digest }}\n\n      # Update the pending deployment on the Pull Request page\n      - name: Update deployment status\n        uses: bobheadxi/deployments@88ce5600046c82542f8246ac287d0a53c461bca3\n        if: always()\n        with:\n          step: finish\n          token: ${{ secrets.GITHUB_TOKEN }}\n          status: ${{ job.status }}\n          env: ${{ github.head_ref }}\n          ref: ${{ github.head_ref }}\n          deployment_id: ${{ steps.create_deployment.outputs.deployment_id }}\n          env_url: ${{ steps.deploy.outputs.review_app_url }}\n```\n\n\n\u003e [!NOTE]  \n\u003e This action is not supported in `push` workflows. Review App Operator is designed to only target pull requests and not branches.\n\n\u003e [!NOTE]\n\u003e The `review_app_name` and `review_app_namespace` must match the `metadata.name` and `metadata.namespace` of the `ReviewApp` resource in Kubernetes.\n\n\n## Workflow to tear down the review app environment when the pull request is closed\n### `.github/workflows/close_pull_request.yml`\n\n```yaml\nname: Close Pull Request\non:\n  pull_request:\n    types:\n      - closed\nconcurrency:\n  group: review-app-${{ github.head_ref }}\n  cancel-in-progress: false\n\njobs:\n  cleanup:\n    name: Cleanup review app environment\n    runs-on: ubuntu-latest\n    steps:\n      - name: Close review app\n        uses: wille/review-app-action@master\n        with:\n          review_app_name: my-reviewapp\n          review_app_namespace: staging\n          webhook_url: https://review-app-operator-webhooks.example.com\n          webhook_secret: ${{ secrets.REVIEW_APP_OPERATOR_WEBHOOK_SECRET }}\n\n      - name: Destroy Github environment\n        uses: bobheadxi/deployments@88ce5600046c82542f8246ac287d0a53c461bca3\n        with:\n          step: deactivate-env\n          token: ${{ secrets.GITHUB_TOKEN }}\n          env: ${{ github.head_ref }}\n          desc: Pull request closed\n```\n\n\u003e [!NOTE]\n\u003e Review App Operator does not integrate with Github Deployments yet, so the examples above includes [bobheadxi/deployments](https://github.com/bobheadxi/deployments) to create and update the deployment status on the pull request page, so that developers have easy access to the review app url.\n\n# Inputs\n\n| Name | Type | Description |\n|------|-------------|----------|\n| `review_app_name` | string | Name of the `ReviewApp` resource in Kubernetes (required) |\n| `review_app_namespace` | string | Namespace where the `ReviewApp` is deployed in Kubernetes (required) |\n| `webhook_url` | string | URL to the Review App Operator webhook (required) |\n| `webhook_secret` | string | Secret to authenticate the webhook (required) |\n| `image` | string | Image to deploy |\n\n# Outputs\n\n| Name | Type | Description |\n|------|-------------|----------|\n| `review_app_url` | string | URL to the deployed review app. A review app may have more than one URL, only the first one will be set |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwille%2Freview-app-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwille%2Freview-app-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwille%2Freview-app-action/lists"}