Skip to content

Commit 806bf77

Browse files
committed
Update DOCS
1 parent c726deb commit 806bf77

File tree

5 files changed

+54
-48
lines changed

5 files changed

+54
-48
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [master]
2020
schedule:
2121
- cron: '45 20 * * 3'
2222

@@ -32,39 +32,39 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'javascript' ]
35+
language: ['javascript']
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3737
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3838

3939
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v2
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
4242

43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v1
46-
with:
47-
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5252

53-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54-
# If this step fails, then you should remove it and run the build manually (see below)
55-
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v1
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
5757

58-
# ℹ️ Command-line programs to run using the OS shell.
59-
# 📚 https://git.io/JvXDl
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
6060

61-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62-
# and modify them (or add more) to build your code if your project
63-
# uses a compiled language
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
6464

65-
#- run: |
66-
# make bootstrap
67-
# make release
65+
#- run: |
66+
# make bootstrap
67+
# make release
6868

69-
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v1
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1

.github/workflows/deploy-stack.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,17 @@ jobs:
2626
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
2727
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2828
aws-region: us-east-1
29-
# - name: Set create stack
30-
# id: createstack
31-
# run: echo "::set-output name=createstack::$CREATE_STACK"
32-
# env:
33-
# CREATE_STACK: ${{ github.event_name != 'repository_dispatch' }}
29+
3430
- uses: ./
3531
name: Update CloudFormation Stack
3632
id: update-stack
3733
with:
3834
githubToken: ${{ secrets.GITHUB_TOKEN }}
39-
stackName: 'richardwillis-github-action-example-cloudformation-stack'
35+
stackName: 'badsyntax-github-action-example-aws-cloudformation'
4036
template: './cloudformation/s3bucket-example.yml'
41-
# Only apply the changeset on pushes to main/release
4237
applyChangeSet: ${{ github.event_name != 'repository_dispatch' }}
4338
awsRegion: 'us-east-1'
44-
parameters: 'S3BucketName=richardwillis.info-example-bucket-us-east-1&S3AllowedOrigins=https://richardwillis.info'
39+
parameters: 'S3BucketName=badsyntax-github-action-example-aws-cloudformation-us-east-1&S3AllowedOrigins=https://richardwillis.info'
4540

4641
- name: Deploy Website
4742
run: |

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Update Stack](https://github.com/badsyntax/github-action-aws-cloudformation/actions/workflows/deploy-stack.yml/badge.svg)](https://github.com/badsyntax/github-action-aws-cloudformation/actions/workflows/deploy-stack.yml)
55
[![CodeQL](https://github.com/badsyntax/github-action-aws-cloudformation/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/badsyntax/github-action-aws-cloudformation/actions/workflows/codeql-analysis.yml)
66

7-
A GitHub Action to create/update your CloudFormation stack to support Infrastructure as Code.
7+
A GitHub Action to create/update your CloudFormation stack to support Infrastructure as Code.
88

99
## Motivation
1010

@@ -74,7 +74,18 @@ jobs:
7474
S3BucketName: ${{ steps.update-stack.outputs.S3BucketName }}
7575
```
7676
77-
## ChangeSet Overview in Pull Requests
77+
## Action Inputs
78+
79+
| key | description | example |
80+
| ---------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
81+
| `stackName` | The name of the Cloudformation stack to be created | `example-com-static-cloudformation-stack` |
82+
| `template` | The relative path to the CloudFormation stack template | `./cloudformation/s3bucket_with_cloudfront.yml` |
83+
| `gitHubToken` | GitHub Token used for commenting on Pull Requests | `${{ secrets.GITHUB_TOKEN }}` |
84+
| `awsRegion` | The AWS region in which to create the stack | `us-east-1` |
85+
| `parameters` | The parameters to override in the stack inputs, in query string format. Whitespace will be stripped | `Param1=foo&Param2=http://example.com` |
86+
| `applyChangeSet` | Whether to apply the ChangeSet, or provide a summary of the ChangeSet | `true` |
87+
88+
## ChangeSet ScreenShots
7889

7990
Pull request created and `applyChangeSet` is `false`:
8091

action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
name: 'AWS CloudFormation'
2-
description: 'Create a CloudFormation Stack from a template.'
1+
name: 'AWS CloudFormation Update'
2+
description: 'Create or Update a CloudFormation Stack from a template'
33
author: 'Richard Willis <[email protected]>'
44
branding:
55
icon: 'upload-cloud'
66
color: 'gray-dark'
77
inputs:
88
stackName:
99
required: true
10-
description: 'The name of the Cloudformation stack to be created. For example: "example-com-static-cloudformation-stack"'
10+
description: 'The name of the Cloudformation stack to be created. For example: example-com-static-cloudformation-stack'
1111
template:
1212
required: true
13-
description: 'The relative path to the CloudFormation stack template. For example: "./cloudformation/s3bucket_with_cloudfront.yml"'
13+
description: 'The relative path to the CloudFormation stack template. For example: ./cloudformation/s3bucket_with_cloudfront.yml'
1414
gitHubToken:
1515
required: true
1616
description: 'GitHub Token used for commenting on Pull Requests. Use the default GITHUB_TOKEN from secrets.'
1717
awsRegion:
1818
require: true
19-
description: 'The AWS region in which to create the stack. For example: "us-east-1"'
19+
description: 'The AWS region in which to create the stack. For example: us-east-1'
2020
parameters:
21-
description: 'The parameters to override in the stack inputs as a query string. For example: "Param1=foo&Param2=http://example.com"'
21+
description: 'The parameters to override in the stack inputs as a query string. For example: Param1=foo&Param2=http://example.com'
2222
required: false
2323
applyChangeSet:
2424
required: false

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"type": "module",
88
"scripts": {
99
"build": "tsc -p tsconfig.build.json",
10-
"format": "prettier --write '**/*.ts'",
11-
"format-check": "prettier --check '**/*.ts'",
10+
"format": "prettier --write '**/*.{json,svg,md,yml,ts}'",
11+
"format-check": "prettier --check '**/*.{json,svg,md,yml,ts}'",
1212
"lint": "eslint src/**/*.ts",
1313
"package": "ncc build lib/main.js --source-map --license licenses.txt",
1414
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
@@ -26,7 +26,7 @@
2626
"node",
2727
"setup",
2828
"aws",
29-
"cloudfront"
29+
"cloudformation"
3030
],
3131
"author": "Richard Willis <[email protected]>",
3232
"license": "MIT",

0 commit comments

Comments
 (0)