-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from al-cheb/first-version
Implement first version of action
- Loading branch information
Showing
12 changed files
with
918 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Validate action | ||
on: | ||
pull_request: | ||
schedule: | ||
- cron: 0 0 * * * | ||
|
||
jobs: | ||
default-parameters: | ||
strategy: | ||
matrix: | ||
os: [ windows-2016, windows-2019 ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: configure-pagefile-action | ||
uses: ./ | ||
with: | ||
minimum-size: 8GB | ||
|
||
- name: validation | ||
shell: pwsh | ||
run: | | ||
(Get-CimInstance Win32_PageFileUsage).AllocatedBaseSize | ||
Invoke-Expression "wmic pagefile list /format:list" | Select-String "AllocatedBaseSize=", "Name=" | ||
custom-parameters: | ||
strategy: | ||
matrix: | ||
os: [ windows-2016, windows-2019 ] | ||
disk-root: [ "C:", "D:" ] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: configure-pagefile-action | ||
uses: ./ | ||
with: | ||
minimum-size: 4GB | ||
maximum-size: 8GB | ||
disk-root: ${{ matrix.disk-root }} | ||
|
||
- name: validation | ||
shell: pwsh | ||
run: | | ||
(Get-CimInstance Win32_PageFileUsage).AllocatedBaseSize | ||
Invoke-Expression "wmic pagefile list /format:list" | Select-String "AllocatedBaseSize=", "Name=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Build action | ||
on: [pull_request] | ||
|
||
jobs: | ||
Build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Set Node.JS | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 12.x | ||
|
||
- name: npm install | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020 Maxim Lobanov and contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,33 @@ | ||
# configure-pagefile-action | ||
Set PageFileSize on GitHub Windows Hosted Agents | ||
This action is intended to configure Pagefile size and location for Windows images in GitHub Actions. | ||
|
||
# Available parameters | ||
| Argument | Description | Format | Default value | | ||
|----------|-------------|--------|---------------| | ||
| `minimum-size` | Set minimum size of Pagefile | `2048MB`, `4GB`, `8GB` and etc | `8GB` | | ||
| `maximum-size` | Set maximum size of Pagefile | The same like `minimum-size` | `minimum-size` | | ||
| `disk-root` | Set disk root where Pagefile will be located | `C:` or `D:` | `D:` | | ||
|
||
# Usage | ||
``` | ||
name: CI | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: configure Pagefile | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 8 | ||
- name: configure Pagefile | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 8 | ||
maximum-size: 16 | ||
disk-root: "D:" | ||
``` | ||
|
||
# License | ||
The scripts and documentation in this project are released under the [MIT License](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Configure Pagefile' | ||
author: 'Aleksandr Chebotov & Maxim Lobanov' | ||
description: 'Configure Pagefile on Windows agents in GitHub Actions' | ||
inputs: | ||
minimum-size: | ||
description: 'Set minimum size of Pagefile' | ||
required: false | ||
default: 8GB | ||
maximum-size: | ||
description: 'Set maximum size of Pagefile' | ||
required: false | ||
disk-root: | ||
description: 'Set disk root where pagefile.sys will be located' | ||
required: false | ||
default: 'D:' | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' | ||
branding: | ||
icon: 'cpu' | ||
color: 'purple' |
Oops, something went wrong.