Skip to content

Commit da62dd4

Browse files
authored
Fix some glitches in the README file
1 parent 300f9ac commit da62dd4

File tree

1 file changed

+12
-26
lines changed

1 file changed

+12
-26
lines changed

README.md

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
# `create-aws-codedeploy-deployment` GitHub Action
22

3-
This action creates [AWS CodeDeploy](https://aws.amazon.com/codedeploy/) deployments from your GitHub Actions workflow.
3+
This action creates [AWS CodeDeploy](https://aws.amazon.com/codedeploy/) deployments from your GitHub Actions workflow. Deployment Group and Deployment configuration itself are derived from an additional configuration section in `.appspec.yml`.
44

5-
This document assumes you are familiar with the [basic AWS CodeDeploy concepts](https://docs.aws.amazon.com/codedeploy/latest/userguide/primary
6-
-components.html).
5+
_Note:_ This README assumes you are familiar with the [basic AWS CodeDeploy concepts](https://docs.aws.amazon.com/codedeploy/latest/userguide/primary-components.html).
76

87
## Design Goals
98

109
While this Action tries to mostly get out of our way, it makes a few basic assumptions:
1110

1211
* For your GitHub repository, there is a corresponding CodeDeploy Application already set up.
1312
* Git branches (and so, GitHub Pull Requests) will be mapped to CodeDeploy Deployment Groups. The action will create these, or update existing ones.
14-
* Ultimately, a CodeDeploy Deployment is created with a [reference to the current commit in your GitHub repository]
15-
(https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-partners-github.html).
13+
* Ultimately, a CodeDeploy Deployment is created with a [reference to the current commit in your GitHub repository](https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-partners-github.html).
1614

17-
The necessary configuration will be parsed from an additional `branch_config` key inside the `appspec.yml` file – which is the core config file for
18-
AWS CodeDeploy that you will need to keep in your repository anyway.
15+
The necessary configuration will be parsed from an additional `branch_config` key inside the `appspec.yml` file – which is the core config file for AWS CodeDeploy that you will need to keep in your repository anyway.
1916

20-
This makes it possible to create a matching configuration once, and then run deployments in different environments automatically. For example,
21-
updating a production system for commits or merges on `master`, and independent staging environments for every open Pull Request branch.
17+
This makes it possible to create a matching configuration once, and then run deployments in different environments automatically. For example, updating a production system for commits or merges on `master`, and independent staging environments for every open Pull Request branch.
2218

2319
## Example Use Case
2420

@@ -52,19 +48,16 @@ jobs:
5248
@${{ github.actor }} this was deployed as [${{ steps.deploy.outputs.deploymentId }}](https://console.aws.amazon.com/codesuite/codedeploy/deployments/${{ steps.deploy.outputs.deploymentId }}?region=eu-central-1) to group `${{ steps.deploy.outputs.deploymentGroupName }}`.
5349
```
5450
55-
First, this configures AWS Credentials in the GitHub Action runner. The [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) action is used for that, and credentials are kept in [GitHub Actions Secrets](https://help.github.com/en/actions/configuring-and-managing-workflows
56-
/creating-and-storing-encrypted-secrets).
51+
First, this configures AWS Credentials in the GitHub Action runner. The [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) action is used for that, and credentials are kept in [GitHub Actions Secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets).
5752
58-
Second, the repo is checked out because we at least need to access the `appspec.yml` file.
53+
Second, the current repository is checked out because we at least need to access the `appspec.yml` file.
5954

6055
Third, this action is run. It does not need any additional configuration in the workflow file, but we'll look at the `appspec.yml` file in a second.
6156

62-
Last, another action is used to show how output generated by this action can be used. In this example, it will leave a GitHub comment on the current
63-
commit, @notifying the commit author that a deployment was made, and point to the AWS Management Console where details for the deployment can be found.
57+
Last, another action is used to show how output generated by this action can be used. In this example, it will leave a GitHub comment on the current commit, @notifying the commit author that a deployment was made, and point to the AWS Management Console where details for the deployment can be found.
6458

6559
Due to the first few lines in this example, the action will be run for commits pushed to the `master` branch and for Pull Requests
66-
being opened or pushed to. With that in mind, let's look at the [`appspec.yml` configuration file](https://docs.aws.amazon.com/codedeploy/latest
67-
/userguide/reference-appspec-file.html).
60+
being opened or pushed to. With that in mind, let's look at the [`appspec.yml` configuration file](https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html).
6861

6962
```yaml
7063
# .appspec.yml
@@ -101,15 +94,9 @@ branch name the action is run on.
10194

10295
The subkeys are evaluated as regular expressions in the order listed, and the first matching one is used.
10396

104-
The first entry makes the action skip the deployment (do nothing at all) when the current branch is called something like `wip/add-feature-x`. You
105-
can use this for example if you have a convention for things that are not ready for deployment yet, or if branches are created automatically by other
106-
tooling and you don't want to deploy them automatically.
97+
The first entry makes the action skip the deployment (do nothing at all) when the current branch is called something like `wip/add-feature-x`. You can use this, for example, if you have a convention for branches that are not ready for deployment yet, or if branches are created automatically by other tooling and you don't want to deploy them automatically.
10798

108-
Commits on the `master` branch are to be deployed in a Deployment Group called `production`. All other commits will create or update a Deployment
109-
Group named `$BRANCH.staging.acme.tld`, where `$BRANCH` will be replaced with a DNS-safe name derived from the current branch. Basically, a branch
110-
called `feat/123/new_gimmick` will use `feat-123-new-gimmick` for `$BRANCH`. Since the Deployment Group Name is available in the
111-
`$DEPLOYMENT_GROUP_NAME` environment variable inside your CodeDeploy Lifecycle Scripts, you can use that to create "staging" environments with a
112-
single, generic configuration statement.
99+
Commits on the `master` branch are to be deployed in a Deployment Group called `production`. All other commits will create or update a Deployment Group named `$BRANCH.staging.acme.tld`, where `$BRANCH` will be replaced with a DNS-safe name derived from the current branch. Basically, a branch called `feat/123/new_gimmick` will use `feat-123-new-gimmick` for `$BRANCH`. Since the Deployment Group Name is available in the `$DEPLOYMENT_GROUP_NAME` environment variable inside your CodeDeploy Lifecycle Scripts, you can use that to create "staging" environments with a single, generic configuration statement.
113100

114101
The `deploymentGroupConfig` and `deploymentConfig` keys in each of the two cases contain configuration that is passed as-is to the
115102
[`CreateDeploymentGroup`](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeploymentGroup.html) or
@@ -118,8 +105,7 @@ The `deploymentGroupConfig` and `deploymentConfig` keys in each of the two cases
118105
`deploymentConfig`. That way, you should be able to configure about every CodeDeploy setting. Note that the `ec2TagFilters` will be used to control
119106
to which EC2 instances (in the case of instance-based deployments) the deployment will be directed.
120107

121-
The only addition made will be that the `revision` parameter for `CreateDeployment` will be set to the current GitHub repository and the commit-ID
122-
that that action is actually run for.
108+
The only addition made will be that the `revision` parameter for `CreateDeployment` will be set to point to the current commit (the one the action is running for) in the current repository.
123109

124110
## Usage
125111

0 commit comments

Comments
 (0)