Skip to content

Commit b816cb7

Browse files
authored
IN-336: Add version 1.0.0 for this action (#1)
1 parent 0fdd5b5 commit b816cb7

File tree

12 files changed

+32637
-0
lines changed

12 files changed

+32637
-0
lines changed

.eslintrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"env": {
3+
"commonjs": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"extends": "eslint:recommended",
8+
"globals": {
9+
"Atomics": "readonly",
10+
"SharedArrayBuffer": "readonly"
11+
},
12+
"parserOptions": {
13+
"ecmaVersion": 2018
14+
},
15+
"rules": {
16+
}
17+
}

.github/workflows/lints.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Lints
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
run-linter:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Install dependencies
14+
run: npm i
15+
16+
- name: Run lint
17+
run: npx eslint 'src/**.js'

.github/workflows/tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Tests"
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
env:
10+
CIVICRM_VERSION: 5.9.beta1
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Build CiviCRM for testing
17+
run: git clone -b $CIVICRM_VERSION --depth 1 https://github.com/compucorp/civicrm-core.git
18+
19+
- name: Run test
20+
uses: ./
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
with:
24+
repo: compucorp/civicrm-core
25+
version: ${{ env.CIVICRM_VERSION }}
26+
path: civicrm-core

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
node_modules/
2+
3+
# Editors
4+
.vscode
5+
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Other Dependency directories
41+
jspm_packages/
42+
43+
# TypeScript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
64+
# next.js build output
65+
.next

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 GitHub Actions
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Apply a Patch Action
2+
3+
This action helps to apply a patch from compared commits generated by Github.
4+
5+
## Usage
6+
7+
```yaml
8+
- uses: compucorp/[email protected]
9+
env:
10+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
with:
12+
# 'The Github repository owner/name. For example, compucorp/civicrm-core'
13+
repo: 'compucorp/civicrm-core'
14+
15+
# A tag or a branch name of the base branch
16+
version: '5.25.0'
17+
18+
# (Optional) 'Path of the working directory.'
19+
path: 'civicrm-core'
20+
```
21+
22+
See the [actions tab](https://github.com/compucorp/apply-patch/actions) for runs of this action! :rocket:

action.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Apply patch'
2+
description: 'An action for applying a patch generated from Github compare commits'
3+
inputs:
4+
repo:
5+
description: 'The repository owner/name. For example, compucorp/civicrm-core'
6+
required: true
7+
default:
8+
version:
9+
description: 'A tag or a branch name of the base branch'
10+
required: true
11+
default:
12+
path:
13+
description: 'Path of working directory.'
14+
required: false
15+
runs:
16+
using: 'node12'
17+
main: 'dist/index.js'

0 commit comments

Comments
 (0)