File tree Expand file tree Collapse file tree 8 files changed +196
-164
lines changed
Expand file tree Collapse file tree 8 files changed +196
-164
lines changed Original file line number Diff line number Diff line change 1- version : 2
2- updates :
3-
4- - package-ecosystem : npm
5- directory : " /"
6- versioning-strategy : increase-if-necessary
7- schedule :
8- interval : monthly
9- open-pull-requests-limit : 20
10- labels :
11- - dependencies
12-
13- - package-ecosystem : " github-actions"
14- directory : " /"
15- schedule :
16- interval : monthly
17- open-pull-requests-limit : 20
18- labels :
19- - dependencies
1+ version : 2
2+ updates :
3+
4+ - package-ecosystem : npm
5+ directory : " /"
6+ versioning-strategy : increase-if-necessary
7+ schedule :
8+ interval : monthly
9+ open-pull-requests-limit : 20
10+ labels :
11+ - dependencies
12+
13+ - package-ecosystem : " github-actions"
14+ directory : " /"
15+ schedule :
16+ interval : monthly
17+ open-pull-requests-limit : 20
18+ labels :
19+ - dependencies
Original file line number Diff line number Diff line change 1+ name : Autoupdate code
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ concurrency :
9+ group : ' autobuild'
10+ cancel-in-progress : true
11+
12+ permissions :
13+ contents : write
14+
15+ jobs :
16+ prepare :
17+ name : Prepare
18+ runs-on : ubuntu-latest
19+ outputs :
20+ date : ${{ steps.date.outputs.date }}
21+ steps :
22+ - name : Get current date
23+ id : date
24+ run : echo "date=$(date -u +'%Y-%m-%d %H:%M UTC')" >> $GITHUB_OUTPUT
25+
26+ update-and-commit :
27+ name : ${{ matrix.name }} and Commit
28+ needs : prepare
29+ runs-on : ubuntu-latest
30+ strategy :
31+ matrix :
32+ include :
33+ - operation : format
34+ name : Format code
35+ description : " Format code according to project standards"
36+ - operation : pack
37+ name : Update dist folder
38+ description : " Rebuild the distribution files"
39+ max-parallel : 1
40+ steps :
41+ - name : Checkout repository
42+ uses : actions/checkout@v4
43+ with :
44+ token : ${{ secrets.IMPRESSBOT_TOKEN }}
45+
46+ - name : Set up Node.js
47+ uses : actions/setup-node@v4
48+ with :
49+ node-version : ' 20'
50+
51+ - name : Install dependencies
52+ run : npm install
53+
54+ - name : Run ${{ matrix.operation }}
55+ run : npm run ${{ matrix.operation }}
56+
57+ - name : Commit and push if changes exist
58+ uses : stefanzweifel/git-auto-commit-action@v5
59+ with :
60+ commit_message : " ${{ matrix.name }} ${{ needs.prepare.outputs.date }}"
61+ commit_user_name : ImpressBot
62+ commit_user_email :
[email protected] 63+ commit_author :
ImpressBot <[email protected] >
Original file line number Diff line number Diff line change 1- name : Automatic releases
2-
3- on :
4- workflow_dispatch :
5- schedule :
6- - cron : ' 5 4 * */3 0'
7-
8- jobs :
9- auto-release :
10- runs-on : ubuntu-latest
11- steps :
12- - name : Releasing if there is something new...
13- uses :
impresscms-dev/[email protected] 14- with :
15- release_branch : main
16- github_token : ${{ secrets.GITHUB_TOKEN }}
17- default_bump : patch
1+ name : Automatic releases
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : ' 0 0 1 */6 *'
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ auto-release :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Releasing if there is something new...
17+ uses :
impresscms-dev/[email protected] 18+ with :
19+ release_branch : main
20+ github_token : ${{ secrets.GITHUB_TOKEN }}
21+ default_bump : patch
Original file line number Diff line number Diff line change 1+ # Based on code from https://andre.arko.net/2022/05/15/automatic-dependabot-merges/
2+
3+ name : " Merge updates"
4+ on :
5+ workflow_run :
6+ workflows :
7+ - " Tests and Checks"
8+ types :
9+ - " completed"
10+ branches :
11+ - " dependabot/**"
12+ jobs :
13+ merge :
14+ name : " Merge"
15+ runs-on : " ubuntu-latest"
16+ if : >
17+ github.event.workflow_run.event == 'pull_request' &&
18+ github.event.workflow_run.conclusion == 'success' &&
19+ github.actor == 'dependabot[bot]'
20+ steps :
21+ - name : " Approve pull request"
22+ uses : " juliangruber/approve-pull-request-action@v2"
23+ with :
24+ github-token : " ${{ secrets.IMPRESSBOT_TOKEN }}"
25+ number : " ${{ github.event.workflow_run.pull_requests[0].number }}"
26+
27+ - name : " Merge pull request"
28+ uses : " actions/github-script@v7"
29+ with :
30+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
31+ script : |
32+ const pullRequest = context.payload.workflow_run.pull_requests[0]
33+ const repository = context.repo
34+ await github.rest.pulls.merge({
35+ merge_method: "merge",
36+ owner: repository.owner,
37+ pull_number: pullRequest.number,
38+ repo: repository.repo,
39+ })
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Tests and Checks
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ types :
8+ - opened
9+ - synchronize
10+ - reopened
11+ - ready_for_review
12+
13+ permissions :
14+ contents : write
15+ pull-requests : write
16+
17+ jobs :
18+ validate :
19+ runs-on : ubuntu-latest
20+ strategy :
21+ matrix :
22+ include :
23+ - task : test
24+ name : Run tests
25+ command : test
26+ - task : format-check
27+ name : Check code formatting
28+ command : format-check
29+ - task : lint
30+ name : Lint code
31+ command : lint
32+ - task : pack
33+ name : Compile
34+ command : pack
35+ fail-fast : false
36+ name : ${{ matrix.name }}
37+ steps :
38+ - name : Checkout code
39+ uses : actions/checkout@v4
40+
41+ - name : Setup Node.js
42+ uses : actions/setup-node@v4
43+ with :
44+ node-version : 20.x
45+ cache : ' npm'
46+
47+ - name : Install dependencies
48+ run : npm install
49+ env :
50+ CI : true
51+
52+ - name : ${{ matrix.name }}
53+ run : npm run ${{ matrix.command }}
Original file line number Diff line number Diff line change 11{
22 "name" : " flattern-markdown-folder-structure-action" ,
3- "version" : " 1.1.0" ,
43 "description" : " GitHub action to flatten file structure with markdown data" ,
54 "main" : " src/index.js" ,
65 "type" : " module" ,
1211 "test" : " node --experimental-vm-modules node_modules/jest/bin/jest.js" ,
1312 "format" : " prettier --write **/*.js tests/**/*.js" ,
1413 "format-check" : " prettier --check **/*.js tests/**/*.js" ,
15- "lint" : " eslint src/**/*.js tests/**/*.js" ,
14+ "lint" : " eslint --no-warn-ignored ' src/**/*.js' ' tests/**/*.js' " ,
1615 "pack" : " ncc build src/index.js --minify" ,
1716 "all" : " npm install && npm run format && npm run lint && npm run pack" ,
1817 "fast-all" : " npm install && npm run pack"
You can’t perform that action at this time.
0 commit comments