mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Merge branch 'dev' into releases/v3
This commit is contained in:
commit
ea7ce9f980
54
.github/workflows/codeql-analysis.yml
vendored
Normal file
54
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -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
|
@ -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)
|
||||
|
||||
@ -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)
|
||||
@ -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 = ''
|
||||
|
@ -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",
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
|
10
yarn.lock
10
yarn.lock
@ -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"
|
||||
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user