Github actions checkout2/17/2024 ![]() This is because default tokens do not allow to update other repos while PATs provide too many permissions. Moreover, I think it would be desirable to support optionally using deployment keys instead of tokens (be it the default or a PAT). Using the token to do so is just another suitable solution. Explicitly setting the user and email would have been an approach. It seems to me that this issue was/is about " do other (authenticated) git operations" precisely update gh-pages (which was/is your " first use case for this"). The post-job step removes the token from the git config. Git config, which enables your scripts to run authenticated git commands. However, many cases still do not have a proper solution, which reduces the usefulness and maturity of this approach.ĭeploying to production is triggered by clicking the button associated with the commit in master, and rolling out to staging is performed automatically in response to changes in master.Ĭurl \ -location -request POST '' \ -header 'Content-Type: application/json' \ -header 'Accept: application/ token used to fetch the repository. Handling specific commits and manual triggering partly boils down to using external events such as a repository_dispatch webhook. ![]() ![]() We do not recommend using this approach in the case of GitHub since, at the moment, the system lacks the tooling for a hassle-free usage of GitHub Workflow. This option implements the approaches described in the Deploy to production from master at the click of a button and Automatically deploy to staging from master sections by reverting changes in master ( recommended).Options for rolling back changes in production: It will allow you to focus on the rules of the deployment process and the workflows suggested.īuild-and-publish : name : Build and Publish runs-on : ubuntu-latest steps : - name : Checkout code uses : with : fetch-depth : 0 - name : Build and Publish uses : with : kube-config-base64-data : $ env : WERF_SET_ENV_URL : " envUrl=" At the same time, all examples are also valid for pre-installed self-hosted runners based on any OS Building, publishing images, and deploying an applicationįirst of all, you need to define a template - the general part of the deployment process suitable for any tier. A good understanding of GitHub Actions basics.Įxamples in this article are based on virtual machines provided by GitHub running on Linux ( runs-on: ubuntu-latest).An application you are going to build and deploy with werf.You can learn more about implementing the CI/CD approach using werf and constructing the custom workflow in the introductory article. Each option for the staging and production environments is complemented by several ways to roll back the release in production. We provide various configuration options for deploying to review, staging, and production environments. The cleanup process runs once a day according to the master schedule.Review environments are deleted automatically when the PR is closed.You can only roll out to the review environment as part of the Pull Request (PR).Deploying/deleting review environments:.Building and publishing are integral parts of the deployment process.Regardless of the workflow in question, all configuration versions are subject to the following rules: You may find the complete set of various configurations for ready-made workflows at the end of this article. We will start with general terms and then move on to the particularities. The detailed description of various jobs and different options for their implementation are available below. In this article, we will examine various options for setting up environments for the following tiers: ![]() The specific set of tiers in the Kubernetes cluster depends on many various factors. Below, we will discuss examples of their use (detailed information is available in the related repository). Jobs are based on comprehensive GitHub Actions, werf/actions, that include all the necessary steps for setting up a specific environment and running required werf commands. cleanup - the job to clean up the container registry.dismiss - the job to delete an application (it is used for review environments only).converge - the job to build, publish, and deploy an application for one of the cluster tiers.The workflow in the repository (a set of GitHub workflow configurations) will be based on the following jobs: In this article, we explore the various options for configuring CI/CD using GitHub CI/CD and werf.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |