{"id":18318500,"url":"https://github.com/garden-io/garden-action","last_synced_at":"2025-04-05T21:32:51.990Z","repository":{"id":100232443,"uuid":"604529758","full_name":"garden-io/garden-action","owner":"garden-io","description":"GitHub action to install and prepare Garden, in order to run workflows, tests or deploy to your environments inside GitHub Workflows.","archived":false,"fork":false,"pushed_at":"2024-06-11T12:51:09.000Z","size":36,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-18T04:36:03.626Z","etag":null,"topics":["continuous-integration","deployment","github-actions"],"latest_commit_sha":null,"homepage":"https://garden.io","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garden-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-02-21T08:55:03.000Z","updated_at":"2024-06-24T21:18:45.000Z","dependencies_parsed_at":"2024-06-11T14:09:01.454Z","dependency_job_id":"c8ad0ad1-79e4-4b24-9b98-fbded3f8b6be","html_url":"https://github.com/garden-io/garden-action","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garden-io%2Fgarden-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garden-io%2Fgarden-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garden-io%2Fgarden-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garden-io%2Fgarden-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garden-io","download_url":"https://codeload.github.com/garden-io/garden-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406080,"owners_count":20933803,"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-integration","deployment","github-actions"],"created_at":"2024-11-05T18:09:49.313Z","updated_at":"2025-04-05T21:32:51.715Z","avatar_url":"https://github.com/garden-io.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# Garden Github Action\n\nThis action installs garden and can optionally be used to run any [Garden](https://garden.io) command, for example `deploy`, `test` or `run workflow`.\n\nGarden combines rapid development, testing, and DevOps automation in one tool.\n\nThis action will perform the following steps:\n\n1. Download Garden from the GitHub release artifacts for the given version (default latest) at [garden-io/garden](https://github.com/garden-io/garden)\n2. Verify the SHA256 checksum\n3. Export garden to the `PATH`, so it can be used from any scripts in the following steps of the GitHub Action job.\n4. If the `command` option is provided, it will run the given garden command.\n\n   If the `command` option is *not* provided it will only prepare garden, which means it will install Garden and export it to the `PATH` environment variable. It will also export the `GARDEN_AUTH_TOKEN` environment variable `garden-auth-token` is configured.\n\n   This is helpful when calling `garden` in scripts from one of the following steps.\n\n**Note:** At the moment this action only works with Linux-based GitHub Action runners.\nIf you are using macOS or Windows runners and need this action, please open a GitHub issue – in case there is demand, we will rewrite this action to make it platform-independent. (We also accept Pull requests for rewriting this Action in Typescript)\n\n## Inputs\n\n## `command`\n\n**Optional** The Garden command to execute, including all options. For example `deploy`, `test`, `run workflow` etc.\n\nIf not provided, the garden-action will\n- install garden and export it to the `PATH` environment variable for subsequent steps\n- export the `GARDEN_AUTH_TOKEN` environment variable for subsequent steps if the `garden-auth-token` input has been provided\n\nFor the full documentation please refer to the [Garden CLI documentation](https://docs.garden.io/reference/commands).\n\n## `garden-version`\n\n**Optional** Garden version. Default is latest\n\n## `garden-auth-token`\n\n**Optional** A token to authenticate to Garden Cloud.\n\nThe secret will be [masked to prevent accidental exposure in logs](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#masking-a-value-in-log).\n\n**If no command has been supplied, the action will expose this value to the the following steps in the GitHub Action job by exporting a `GARDEN_AUTH_TOKEN` environment variable.**\n\n## `garden-workdir`\n\n**Optional** A path to a garden project in a repository.\n\nOnly necessary if there are multiple garden projects in a repository or if the `project.garden.yml` is in a subdirectory.\n\n## `github-token`\n\n**Optional** This token will be used to authenticate to GitHub API for fetching the latest Garden release. Defaults to `${{ github.token }}`.\n\nThe secret will be [masked to prevent accidental exposure in logs](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#masking-a-value-in-log).\n\n\n## Outputs\n\nThe garden-action does not export any outputs.\n\n## Example usage\n\nThis example uses the `aws-actions/configure-aws-credentials` action beforehand to authenticate to AWS. This might look different with other cloud providers.\nIt deploys a preview environment for other team members/teams to explore and tests the latest pushed code in a separate ci environment. In the ci environment, some additional variables are used.\n\n```\nname: garden\non:\n  push:\n    branches:\n      - main\njobs:\n  garden-preview:\n    runs-on: ubuntu-latest\n    steps:\n      - name: AWS auth\n        uses: aws-actions/configure-aws-credentials@v1.7.0\n        with:\n          aws-region: eu-central-1\n          role-to-assume: ${{ secrets.AWS_ROLE_EKS_DEV }}\n          role-session-name: GitHubActionsDev\n          role-duration-seconds: 3600\n      - name: AWS EKS Kubeconfig\n        run: |\n          # Add EKS cluster ${cluster_name} to ~/.kube/config\n          # NOTE: The context name will be the EKS cluster ARN by default.\n          # If your Garden configuration expects a different context name,\n          # you can add override it using the `--alias` option.\n          aws eks update-kubeconfig --name ${cluster_name} --region ${region}\n      - uses: actions/checkout@v3.0.2\n      - name: Deploy preview env with Garden\n        uses: garden-io/garden-action@v2\n        with:\n          command: deploy --env preview\n          garden-auth-token: ${{ secrets.GARDEN_AUTH_TOKEN }}\n  garden-ci:\n    runs-on: ubuntu-latest\n    steps:\n      - name: AWS auth\n        uses: aws-actions/configure-aws-credentials@v1.7.0\n        with:\n          aws-region: eu-central-1\n          role-to-assume: ${{ secrets.AWS_ROLE_EKS_DEV }}\n          role-session-name: GitHubActionsDev\n          role-duration-seconds: 3600\n      - name: AWS EKS Kubeconfig\n        run: |\n          # Add EKS cluster ${cluster_name} to ~/.kube/config\n          # NOTE: The context name will be the EKS cluster ARN by default.\n          # If your Garden configuration expects a different context name,\n          # you can add override it using the `--alias` option.\n          aws eks update-kubeconfig --name ${cluster_name} --region ${region}\n      - uses: actions/checkout@v3.0.2\n      - name: Run tests in ci environment with Garden\n        uses: garden-io/garden-action@v2\n        with:\n          command: \u003e\n            test --env ci\n            --var postgres-database=postgres\n            --var postgres-password=${{ secrets.PG_PASSWORD }}\n          garden-auth-token: ${{ secrets.GARDEN_AUTH_TOKEN }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarden-io%2Fgarden-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarden-io%2Fgarden-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarden-io%2Fgarden-action/lists"}