From 5e83bda10616bde35405ca2deafa1c789d7111a4 Mon Sep 17 00:00:00 2001
From: Edward Vella <dwardu89@users.noreply.github.com>
Date: Thu, 11 Feb 2021 19:22:16 +0000
Subject: [PATCH] Update readme (#12)

* chore: Update the Readme documentation

* chore: Adding pull request validation to ensure label validation
---
 .github/workflows/pull_request.yml | 18 ++++++++++++++++
 README.md                          | 33 ++++++++++++++++++++++++------
 action.yml                         |  4 ++--
 package.json                       |  2 +-
 4 files changed, 48 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 4607df7b..ba171d55 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -86,3 +86,21 @@ jobs:
           ssm-path: "/dwardu89/hello"
           ssm-value: ${{ secrets.SSM_VALUE_EXAMPLE }}
           ssm-value-type: "String"
+
+  check_semver_label:
+    name: Check for semantic version label
+    runs-on: ubuntu-latest
+    steps:
+      - uses: docker://agilepathway/pull-request-label-checker:latest
+        with:
+          one_of: major,minor,patch
+          repo_token: ${{ secrets.GITHUB_TOKEN }}
+
+  check_pull_request_type:
+    name: Check for pull request type label
+    runs-on: ubuntu-latest
+    steps:
+      - uses: docker://agilepathway/pull-request-label-checker:latest
+        with:
+          one_of: bug,enhancement,chore
+          repo_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/README.md b/README.md
index c0b5b8a3..c8f54934 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,10 @@
 # AWS SSM Parameter Store GitHub Action
 
-This GitHub Action was created to solve the problem when using Terraform or CloudFormation, you would have to store the secret encrypted in an encrypted format, then write extra steps to decrypt it. Terraform suffers from storing sensitive data as plain text which would require you to further encrypt your state file. Sometimes the simplest solution would have to manage the secret manually if using SSM Parameter store.
+This GitHub Action allows you to inject parameters into AWS Systems Manager Parameter Store. It was created to solve the problem of secret management when using infrastructure as code.
+
+Terraform requires extra work in order to secure your state file because the secret is stored as plain text. This would require you to encrypt/decrypt the statefile when you are modifying state.
+
+CloudFormation requires you to store it before you can reference it.
 
 This action helps solve this problem by allowing the user to provide the path and the value that wants to be stored in a GitHub Action and the value can be passed in as a secret from the github actions. Pair this with the `Environments` feature and you can have a GitHub Action CI that also manages secrets.
 
@@ -37,11 +41,28 @@ The AWS KMS Key ARN to use to encrypt the key. Default uses the AWS Provided KMS
 ## Example usage
 
 ```yaml
-uses: dwardu89/aws-ssm-parameter-store
-with:
-  aws-region: eu-west-1
-  ssm-path: /dwardu89/hello
-  ssm-value: ${{ secrets.WORLD }}
+name: store_secret
+on:
+  pull_request:
+    branches:
+      - master
+jobs:
+  add_to_ssm:
+    runs-on: Ubuntu-20.04
+    name: Store a Secret
+    steps:
+      - name: Configure AWS Credentials
+        uses: aws-actions/configure-aws-credentials@v1
+        with:
+          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
+          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+          aws-region: eu-west-1
+      - name: Add hello SecureString to SSM
+        uses: dwardu89/aws-ssm-parameter-store@v1
+        with:
+          ssm-path: "/dwardu89/hello"
+          ssm-value: ${{ secrets.WORLD }}
+          aws-region: eu-west-1
 ```
 
 ## Required IAM Permissions
diff --git a/action.yml b/action.yml
index 3f8bd24d..0f43394d 100644
--- a/action.yml
+++ b/action.yml
@@ -1,5 +1,5 @@
-name: "AWS SSM Parameter Store Writer"
-description: "Stores a secure string in amazon SSM Agent."
+name: "AWS Parameter Store Injector"
+description: "Secret management for GitHub Actions using AWS Systems Manager Parameter Store."
 branding:
   icon: briefcase
   color: orange
diff --git a/package.json b/package.json
index 577db8b1..ab5e176f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "aws-ssm-parameter-store",
   "version": "1.0.0",
-  "description": "This GitHub Action was created with the problem that was discovered when working with secrets and infrastructure as code.",
+  "description": "Inject parameters and secrets into AWS SSM Parameter Store in your CI.",
   "main": "index.js",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"