Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0.0 #33

Merged
merged 62 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3f3351a
Created New Version
NickLiffen Apr 15, 2021
cb78545
Pushing build
NickLiffen Apr 15, 2021
91b7114
Rename
NickLiffen Apr 15, 2021
670d96a
Pushing quick update
NickLiffen Apr 15, 2021
45075d9
Setting Default Version
NickLiffen Apr 15, 2021
4b0da28
Update Specs and Policies
NickLiffen Apr 15, 2021
9b4098b
Running Build First
NickLiffen Apr 15, 2021
999c940
Pushing Updates Files without module
NickLiffen Apr 15, 2021
36e480b
Moving to where the cfn lint files are found
NickLiffen Apr 15, 2021
b403f7b
Build Vrsion
NickLiffen Apr 15, 2021
9df6867
Removing Module
NickLiffen Apr 15, 2021
2141f11
Pushing new version
NickLiffen Apr 15, 2021
ab22ae5
Pushing new version
NickLiffen Apr 15, 2021
96a01d7
Update Specs
NickLiffen Apr 15, 2021
f98f2d2
echo PATH
NickLiffen Apr 15, 2021
ffe9bfb
Pushing Changes
NickLiffen Apr 15, 2021
e1aa658
Testing CFN Lint locally
NickLiffen Apr 15, 2021
daf409d
Pushing Input Command Test
NickLiffen Apr 16, 2021
634016c
Pushing Build Update
NickLiffen Apr 16, 2021
2e2c33e
Update Example Workflow
NickLiffen Apr 16, 2021
01ab050
Update Example Workflow
NickLiffen Apr 16, 2021
f11a050
Allowing Null
NickLiffen Apr 16, 2021
693d150
Pushing new version
NickLiffen Apr 16, 2021
5598ce2
Parsing Response
NickLiffen Apr 16, 2021
9b424e4
Decoupled Architecure
NickLiffen Apr 16, 2021
5109933
Pushing new GitHub Workflow
NickLiffen Apr 16, 2021
7d663b5
Pushing New Workflows
NickLiffen Apr 16, 2021
4596cf9
Updated Workflow
NickLiffen Apr 16, 2021
94f4ec4
Update Template
NickLiffen Apr 16, 2021
4cb059b
Pushing different versions
NickLiffen Apr 16, 2021
84573b5
Adding Unit Tests
NickLiffen Apr 16, 2021
33e97f9
Adding Coverage to GitIgnore
NickLiffen Apr 16, 2021
4041173
Removing Coverage
NickLiffen Apr 16, 2021
a1dbce4
adding unit testing to workflow
NickLiffen Apr 16, 2021
a4a2de2
Updated README.md & CHANGLOG.md
NickLiffen Apr 16, 2021
f61e3bd
Remove one test
NickLiffen Apr 16, 2021
45e78bb
Removing Step from README.md
NickLiffen Apr 16, 2021
cbbaf01
Fixed Unit Tests & Prettier Commands
NickLiffen Apr 16, 2021
0091d3b
Update .github/dependabot.yml
Apr 18, 2021
f395dbd
Update .github/dependabot.yml
Apr 18, 2021
74ad61a
Update README.md
Apr 18, 2021
0a81557
Update examples/template.yml
Apr 18, 2021
e7a05fe
Merge branch 'master' into ft/2.0.0
NickLiffen Apr 18, 2021
fae9c0c
Change URL within CHANGELOG based on feedback
NickLiffen Apr 18, 2021
74b22c6
Merge branch 'ft/2.0.0' of https://github.com/NickLiffen/cfn-lint-act…
NickLiffen Apr 18, 2021
3f7bcf2
Fixing Prettier Issues
NickLiffen Apr 18, 2021
8ed902e
Adding Pre-Commit Hooks
NickLiffen Apr 18, 2021
5f879ce
Update .github/workflows/codeql-analysis.yml
Apr 19, 2021
651f353
Update README.md
Apr 19, 2021
52546ee
Update README.md
Apr 19, 2021
ae952bd
Update README.md
Apr 19, 2021
1cc7844
Update package.json
Apr 19, 2021
71f9114
Pushing Changes based on Feedback
NickLiffen Apr 19, 2021
601c72b
Removing Temp Directory
NickLiffen Apr 19, 2021
d71843d
Update action.yml
Apr 19, 2021
d99c6c1
Update action.yml
Apr 19, 2021
aaec0ff
Update README.md
Apr 19, 2021
8bed337
Update README.md
Apr 19, 2021
1fa2daa
Update README.md
Apr 19, 2021
ebaa16d
Update README.md
Apr 19, 2021
72bb420
Update README.md
Apr 19, 2021
836f70f
Update README.md
ScottBrenner Apr 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .dockerignore

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
13 changes: 13 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"commonjs": true,
"es6": true,
"jest": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {}
}
5 changes: 2 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ updates:
schedule:
interval: "weekly"

# Enable version updates for Docker
- package-ecosystem: "docker"
# Look for a `Dockerfile` in the `root` directory
# Enable version updates for npm
- package-ecosystem: "npm"
directory: "/"
# Check for updates once a week
schedule:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "CodeQL"

on:
push:
branches: [ main, v* ]
pull_request:
branches: [ main, v* ]
schedule:
- cron: '38 18 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
127 changes: 54 additions & 73 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,63 @@
name: CI

name: "Tests"
on:
push:
branches:
- master # Push events on master branch
pull_request: # Run tests for any PRs

env:
IMAGE_NAME: cfn-lint-action

branches:
- main
- ft/2.0.0
pull_request:
jobs:
# Run tests.
test:
unit:
name: npm test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Docker build
run: docker build . --file Dockerfile --tag image

- name: Docker run
run: docker run --entrypoint cfn-lint image -v

lint:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest

##################
# Load all steps #
##################
- uses: actions/setup-node@v2
- run: npm ci
- run: npm test
integ:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-18.04
- ubuntu-20.04
- windows-2016
- windows-2019
- macos-10.15
ScottBrenner marked this conversation as resolved.
Show resolved Hide resolved
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
# Step 1
- name: Git Checkout
uses: actions/checkout@v2

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: docker://github/super-linter:v2.2.0
env:
VALIDATE_ALL_CODEBASE: true

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test

runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v2

- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME

- name: Log into GitHub Container Registry
run: echo "${{ secrets.CFN_CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push image to GitHub Container Registry
# Step 2
- name: Setup Cloud Formation Linter with Latest Version
uses: ./
# Step 3
- name: Print the Cloud Formation Linter Version & run Linter.
run: |
cfn-lint --version
cfn-lint -t ./examples/template.yml
# Step 4
- name: Setup Cloud Formation Linter with Specific Version
uses: ./
with:
version: "0.44.5"
ScottBrenner marked this conversation as resolved.
Show resolved Hide resolved
# Step 5
- name: Print the Cloud Formation Linter Version & run Linter.
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
SHA="${{ github.sha }}"
# Strip git ref prefix from version
REF=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
echo IMAGE_ID=$IMAGE_ID
echo SHA=$SHA
echo REF=$REF
docker tag $IMAGE_NAME $IMAGE_ID:$SHA
docker tag $IMAGE_NAME $IMAGE_ID:$REF
docker push $IMAGE_ID:$SHA
docker push $IMAGE_ID:$REF
cfn-lint --version
cfn-lint -t ./examples/template.yml
# Step 6
### Testing specifying a version and command
- name: Testing with CFN Lint Version & Command
uses: ./
with:
command: cfn-lint -t ./examples/template.yml
version: "0.44.5"
# Step 7
### Testing specifying a version and command
- name: Testing with CFN Lint Command
uses: ./
with:
command: cfn-lint -t ./examples/template.yml
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
NickLiffen marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
coverage
dist
examples
.github
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog
ScottBrenner marked this conversation as resolved.
Show resolved Hide resolved

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0](https://github.com/ScottBrenner/cfn-lint-action/releases/tag/v2.0.0)

### Added

- GitHub Action is now written in JavaScript.
- Unit Tests (90% Coverage).
- User can now specify any command they need to run.

### Removed

- The default functionality to run a command.
23 changes: 0 additions & 23 deletions Dockerfile

This file was deleted.

Loading