Skip to content

Commit 1a70159

Browse files
Merge pull request #106 from microsoft/release/vNext
Workflow to compile TypeScript and commit resulting JavaScript
2 parents 52f2370 + b3e48a2 commit 1a70159

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: security-devops-action Official Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- release/vNext
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
22+
- name: Extract branch name
23+
shell: bash
24+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
25+
id: extract_branch
26+
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v2
29+
with:
30+
node-version: '14'
31+
32+
- name: Configure npm to use GitHub Packages
33+
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
34+
35+
- name: Install dependencies
36+
run: npm install
37+
38+
- name: Compile TypeScript
39+
run: npm run build
40+
41+
- name: Commit compiled JavaScript
42+
run: |
43+
git config --global user.name 'github-actions[bot]'
44+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
45+
git add lib/.
46+
git commit -m 'Official Build: Compile TypeScript to JavaScript'
47+
git push --force origin HEAD:${{ steps.extract_branch.outputs.branch }}
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lib/msdo-helpers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var Tools;
2525
(function (Tools) {
2626
Tools["Bandit"] = "bandit";
2727
Tools["Binskim"] = "binskim";
28+
Tools["Checkov"] = "checkov";
2829
Tools["ContainerMapping"] = "container-mapping";
2930
Tools["ESLint"] = "eslint";
3031
Tools["TemplateAnalyzer"] = "templateanalyzer";

src/msdo-helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export enum RunnerType {
2929
export enum Tools {
3030
Bandit = 'bandit',
3131
Binskim = 'binskim',
32+
Checkov = 'checkov',
3233
ContainerMapping = 'container-mapping',
3334
ESLint = 'eslint',
3435
TemplateAnalyzer = 'templateanalyzer',

0 commit comments

Comments
 (0)