{"id":19292453,"url":"https://github.com/werf/actions","last_synced_at":"2025-08-21T13:32:20.978Z","repository":{"id":42825109,"uuid":"266780222","full_name":"werf/actions","owner":"werf","description":"Set of actions for implementing CI/CD with werf and GitHub Actions ","archived":false,"fork":false,"pushed_at":"2024-06-19T03:48:25.000Z","size":3541,"stargazers_count":80,"open_issues_count":7,"forks_count":5,"subscribers_count":6,"default_branch":"v2","last_synced_at":"2024-08-20T02:13:39.565Z","etag":null,"topics":["action","actions","ci-cd","continuous-delivery","continuous-integration","devops","docker","dockerfile","github-actions","gitops","k8s","werf"],"latest_commit_sha":null,"homepage":"https://werf.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/werf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2020-05-25T13:00:35.000Z","updated_at":"2024-07-24T04:30:37.000Z","dependencies_parsed_at":"2023-12-22T00:52:39.080Z","dependency_job_id":"45c68d50-ef44-4ac6-866f-975fb41e616a","html_url":"https://github.com/werf/actions","commit_stats":{"total_commits":68,"total_committers":4,"mean_commits":17.0,"dds":"0.23529411764705888","last_synced_commit":"249bcf41aa013961eeb7b2d12c683d25dc7f9a55"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werf%2Factions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werf%2Factions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werf%2Factions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werf%2Factions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/werf","download_url":"https://codeload.github.com/werf/actions/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230516182,"owners_count":18238352,"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":["action","actions","ci-cd","continuous-delivery","continuous-integration","devops","docker","dockerfile","github-actions","gitops","k8s","werf"],"created_at":"2024-11-09T22:30:58.467Z","updated_at":"2025-08-21T13:32:20.965Z","avatar_url":"https://github.com/werf.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://werf.io/assets/images/werf-logo.svg?sanitize=true\" style=\"max-height:100%;\" height=\"175\"\u003e\n\u003c/p\u003e\n___\n\nThis action allows you to organize CI/CD with GitHub Actions and [werf](https://github.com/werf/werf).\n\n**Ready-to-use GitHub Actions Workflows** for different CI/CD workflows are available [here](https://werf.io/guides/nodejs/400_ci_cd_workflow/040_github_actions.html).\n\n## How to use\n\n```yaml\nconverge:\n  name: Converge\n  runs-on: ubuntu-latest\n  steps:\n\n    - name: Checkout code\n      uses: actions/checkout@v4\n      with:\n        fetch-depth: 0\n    \n    - name: Install werf\n      uses: werf/actions/install@v2\n      \n    - name: Run script\n      run: |\n        . $(werf ci-env github --as-file) \n        werf converge\n      env:\n        WERF_KUBECONFIG_BASE64: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}\n        WERF_ENV: production\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Versioning\n\nWhen using action, select the version corresponding to the required `MAJOR` version of werf.\n\nBy default, the action installs actual werf version within alpha channel (more details about channels, werf release cycle and compatibility promise [here](https://werf.io/installation.html#all-changes-in-werf-go-through-all-stability-channels)). \nUsing the `channel` input the user can switch the release channel.\n\n\u003e This is recommended approach to be up-to-date and to use actual werf version without changing configurations.\n  \n```yaml\n- uses: werf/actions/install@v2\n  with:\n    channel: alpha\n```\n  \nWithal, it is not necessary to work within release channels, and the user might specify certain werf version with `version` input.\n\n```yaml\n- uses: werf/actions/install@v2\n  with:\n    version: v2.1.0\n```\n\n## FAQ\n\n### werf always rebuilds images on new commit\n\nMake sure to use `fetch-depth: 0` setting in the checkout action, like follows:\n\n```yaml\n- name: Checkout code\n  uses: actions/checkout@v4\n  with:\n    fetch-depth: 0\n```\n\nBy default, fetch-depth set to `1` which disables git history when checking out code. werf cache selection algorithm uses git history to determine whether some image bound to some commit could be used as a cache when building current commit (current commit should be descendant to the cache commit).\n\nSetting `fetch-depth` to `0` enables full fetch of git history, and it is a **recommended** approach. It is also possible to limit fetch history with some decent number of commits, which would enable images caching limited to that number of commits, but this would have a negative impact on cache reproducibility.\n\n### Working with container registry\n\nIf there is a need to perform authorization using custom credentials or in an external container registry, then you have to use a ready-made action tailored to your container registry (or just run `werf cr login`).\n\n```yaml\nconverge:\n  name: Converge\n  runs-on: ubuntu-latest\n  steps:\n\n    - name: Checkout code\n      uses: actions/checkout@v4\n      with:\n        fetch-depth: 0\n    \n    - name: Install werf\n      uses: werf/actions/install@v2\n    \n    - name: cr login\n      run: werf cr login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_TOKEN }} registry.example.com\n    \n    - name: converge\n      run: werf converge\n      env:\n        WERF_KUBECONFIG_BASE64: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}\n        WERF_ENV: production\n        WERF_REPO: registry.example.com/repo\n```\n\n\u003e Environment variables **`WERF_REPO`** and **`GITHUB_TOKEN`** for converge should only be used if building images is required otherwise they can be omitted \n\nIn the simplest case, if an [integrated GitHub Packages-like container registry](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages) is used, then the authorization is performed automatically when the `werf ci-env` command is invoked. This command is run with several required arguments such as GitHub environment variables, the [`GITHUB_TOKEN` secret](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret) (you have to explicitly declare it).\n\n### Building multi-platform images\n\nTo build multi-platform images or customize the build environment, you can use [docker/setup-buildx-action@v3](https://github.com/docker/setup-buildx-action).\n\n```yaml\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Install werf\n        uses: werf/actions/install@v2\n\n      - name: cr login\n        run: werf cr login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_TOKEN }} registry.example.com\n\n      - name: converge\n        run: |\n          . $(werf ci-env github --as-file)\n          werf converge\n        env:\n          WERF_KUBECONFIG_BASE64: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}\n          WERF_ENV: production\n```\n\n\u003e No additional configuration is required, and QEMU is automatically used for cross-platform builds.\n\n## License\n\nApache License 2.0, see [LICENSE](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerf%2Factions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwerf%2Factions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerf%2Factions/lists"}