Skip to content

Commit

Permalink
Add "Super Linter" CI pipeline (#3)
Browse files Browse the repository at this point in the history
* Add Super Lint GitHub Action

* Fix MD Lint errors

* Add 'Create release' pipeline
  • Loading branch information
fabasoad authored Jan 17, 2021
1 parent a071a30 commit ee81f2d
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 76 deletions.
25 changes: 16 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,32 @@ assignees: fabasoad

---

**Describe the bug**
## Describe the bug

A clear and concise description of what the bug is.

**Steps to Reproduce**
## Steps to Reproduce

1. Run '...'
2. See error

**Expected behavior**
## Expected behavior

A clear and concise description of what you expected to happen.

**Actual behavior**
## Actual behavior

A clear and concise description of what is happening now.

**Screenshots**
## Screenshots

If applicable, add screenshots to help explain your problem.

**Technical information (please complete the following information):**
- OS: [e.g. Windows 10 Enterprise v.1909 (OS Build 18363.720)]
- `pascal-action` version [e.g. 1.0.2]
## Technical information (please complete the following information)

- OS: [e.g. Windows 10 Enterprise v.1909 (OS Build 18363.720)]
- `pascal-action` version [e.g. 1.0.2]

## Additional context

**Additional context**
Add any other context about the problem here.
10 changes: 6 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Closes #<IssueNumber>
<!-- markdownlint-disable-file MD041 -->

Closes #{IssueNumber}

## Pull request checklist

Expand All @@ -11,9 +13,9 @@ Please check if your PR fulfills the following requirements:

## Pull request type

<!-- Please do not submit updates to dependencies unless it fixes an issue. -->
<!-- Please do not submit updates to dependencies unless it fixes an issue. -->

<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->

Please check the type of change your PR introduces:

Expand All @@ -23,7 +25,7 @@ Please check the type of change your PR introduces:
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
- [ ] Other (please describe):

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Create release

on:
push:
branches:
- main

jobs:
create_release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Get commits since last release
id: changes
uses: simbo/changes-since-last-release-action@v1
- name: Get latest version
id: substring
run: |
ver=$(echo "${{ steps.changes.outputs.last-tag }}" | cut -c2-)
echo '::set-output name=version::'$ver
- name: Increase version
id: semver
uses: matt-FFFFFF/simple-semver@v0.1.0
with:
semver-input: ${{ steps.substring.outputs.version }}
increment: p
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.semver.outputs.semver }}
release_name: v${{ steps.semver.outputs.semver }}
body: |
# Changes
${{ steps.changes.outputs.log }}
draft: false
prerelease: false
20 changes: 0 additions & 20 deletions .github/workflows/dockerfile-lint.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Lint

on:
push:
branches:
- main
- 'bugfix/**'
- 'feature/**'

jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter@v3.14.4
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/security-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
run: |
docker build -t ${{ github.repository }}:${{ github.sha }} .
snyk auth ${{ secrets.SNYK_API_TOKEN }}
snyk test --docker ${{ github.repository }}:${{ github.sha }} --file=Dockerfile
snyk test --docker ${{ github.repository }}:${{ github.sha }} --file=Dockerfile --exclude-base-image-vulns
15 changes: 0 additions & 15 deletions .github/workflows/shell-lint.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/yaml-lint.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true,
"fixAll.eslint": true
},
"cSpell.words": [
"HADOLINT",
"appium",
Expand All @@ -7,6 +11,10 @@
"ibiqlik",
"issuehunt",
"liberapay",
"markdownlint",
"semver",
"simbo",
"vulns",
"yamllint"
]
}
7 changes: 0 additions & 7 deletions .yamllint.yml

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- markdownlint-disable-file MD013 -->

# Run Pascal script action

![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/pascal-action?include_prereleases) ![CI (latest)](https://github.com/fabasoad/pascal-action/workflows/CI%20(latest)/badge.svg) ![Functional tests](https://github.com/fabasoad/pascal-action/workflows/Functional%20tests/badge.svg) ![Security tests](https://github.com/fabasoad/pascal-action/workflows/Security%20tests/badge.svg) ![YAML Lint](https://github.com/fabasoad/pascal-action/workflows/YAML%20Lint/badge.svg) ![Dockerfile Lint](https://github.com/fabasoad/pascal-action/workflows/Dockerfile%20Lint/badge.svg) ![Shell Lint](https://github.com/fabasoad/pascal-action/workflows/Shell%20Lint/badge.svg)
![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/pascal-action?include_prereleases) ![CI (latest)](https://github.com/fabasoad/pascal-action/workflows/CI%20(latest)/badge.svg) ![Functional tests](https://github.com/fabasoad/pascal-action/workflows/Functional%20tests/badge.svg) ![Security tests](https://github.com/fabasoad/pascal-action/workflows/Security%20tests/badge.svg) ![Lint](https://github.com/fabasoad/pascal-action/workflows/Lint/badge.svg)

This action runs Pascal script.

Expand Down

0 comments on commit ee81f2d

Please sign in to comment.