Skip to content

Commit

Permalink
Merge branch 'dev' into releases/v3
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Jul 27, 2020
2 parents 37acdb9 + 3393207 commit ea7ce9f
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 16 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "CodeQL"

on:
push:
branches: [dev, master, releases/v2, releases/v3]
pull_request:
# The branches below must be a subset of the branches above
branches: [dev]
schedule:
- cron: '0 9 * * 4'

jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

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

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

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

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
11 changes: 5 additions & 6 deletions __tests__/git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {mkdirP, rmRF} from '@actions/io'
import {action, Status} from '../src/constants'
import {execute} from '../src/execute'
import {deploy, generateBranch, init, switchToBaseBranch} from '../src/git'
import fs from 'fs';
import fs from 'fs'

const originalAction = JSON.stringify(action)

Expand Down Expand Up @@ -373,13 +373,13 @@ describe('git', () => {
name: 'asd',
email: 'as@cat'
},
clean: true,
clean: true
})

const response = await deploy(action)
fs.createWriteStream("assets/.nojekyll");
fs.createWriteStream("assets/CNAME");

fs.createWriteStream('assets/.nojekyll')
fs.createWriteStream('assets/CNAME')

// Includes the call to generateBranch
expect(execute).toBeCalledTimes(12)
Expand All @@ -406,7 +406,6 @@ describe('git', () => {
expect(execute).toBeCalledTimes(18)
expect(rmRF).toBeCalledTimes(1)
})


it('should execute commands with clean options, ommits sha commit message', async () => {
process.env.GITHUB_SHA = ''
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@jamesives/github-pages-deploy-action",
"description": "GitHub action for building a project and deploying it to GitHub pages.",
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
"version": "3.5.7",
"version": "3.5.8",
"license": "MIT",
"main": "lib/lib.js",
"types": "lib/lib.d.ts",
Expand Down Expand Up @@ -49,6 +49,6 @@
"jest-circus": "26.1.0",
"prettier": "2.0.5",
"ts-jest": "25.5.1",
"typescript": "3.9.6"
"typescript": "3.9.7"
}
}
6 changes: 3 additions & 3 deletions src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export async function generateBranch(action: ActionInterface): Promise<void> {
)
await execute(`git reset --hard`, action.workspace, action.silent)
await execute(
`git commit --allow-empty -m "Initial ${action.branch} commit"`,
`git commit --no-verify --allow-empty -m "Initial ${action.branch} commit"`,
action.workspace,
action.silent
)
Expand Down Expand Up @@ -233,7 +233,7 @@ export async function deploy(action: ActionInterface): Promise<Status> {
action.silent
)
await execute(
`git commit -m "${commitMessage}" --quiet`,
`git commit -m "${commitMessage}" --quiet --no-verify`,
`${action.workspace}/${temporaryDeploymentDirectory}`,
action.silent
)
Expand Down Expand Up @@ -262,7 +262,7 @@ export async function deploy(action: ActionInterface): Promise<Status> {
action.silent
)
await execute(
`git commit -m "${commitMessage}" --quiet`,
`git commit -m "${commitMessage}" --quiet --no-verify`,
`${action.workspace}/${temporaryDeploymentDirectory}`,
action.silent
)
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3486,8 +3486,8 @@ lodash.sortby@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"

lodash@^4.11.1, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
version "4.17.19"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"

lolex@^5.0.0:
version "5.1.2"
Expand Down Expand Up @@ -4800,9 +4800,9 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@3.9.6:
version "3.9.6"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.6.tgz#8f3e0198a34c3ae17091b35571d3afd31999365a"
typescript@3.9.7:
version "3.9.7"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"

union-value@^1.0.0:
version "1.0.1"
Expand Down

0 comments on commit ea7ce9f

Please sign in to comment.