Skip to content

Commit 0b552a1

Browse files
authored
Adds testing (#12)
* Adds testing * Update ci.yml * Update ci.yml * Update README.md * Update ci.yml * Delete const.js
1 parent 7692976 commit 0b552a1

File tree

12 files changed

+6772
-518
lines changed

12 files changed

+6772
-518
lines changed

.github/workflows/ci.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
security_hardening:
10+
name: Check security hardening
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Clone the repository
14+
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
15+
- name: Ensure SHA pinned actions
16+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@8877889a5717dad0b139f1d2925689aa68f88a43
17+
18+
testing:
19+
name: Run testing
20+
needs: security_hardening
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Clone the repository
24+
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
25+
- name: Set Node.js 12.x
26+
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
27+
with:
28+
node-version: 12.x
29+
- name: Install dependencies
30+
run: npm ci
31+
- name: Linter
32+
run: npm run lint
33+
- name: Tester
34+
run: npm run test
35+
- name: Preparer
36+
run: npm run prepare

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# GitHub Action — Ensure SHA Pinned Actions
2+
[![CI](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/actions/workflows/ci.yml/badge.svg)](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/actions/workflows/ci.yml)
23

34
This GitHub Action (written in JavaScript) allows you to leverage GitHub Actions to ensure that GitHub Actions are pinned to full length commit SHAs. This does not fail for referenced actions in the same repository when using the [`./path/to/dir` syntax](https://docs.github.com/actions/learn-github-actions/finding-and-customizing-actions#referencing-an-action-in-the-same-repository-where-a-workflow-file-uses-the-action). For more information, see "[using third-party actions](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions)."
45

dist/index.js

+9-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)