-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
- Loading branch information
Showing
14 changed files
with
5,770 additions
and
0 deletions.
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,36 @@ | ||
name: setup-qemu-ci | ||
|
||
on: | ||
push: | ||
paths: | ||
- .github/workflows/setup-qemu-ci.yml | ||
- setup-qemu/** | ||
pull_request: | ||
paths: | ||
- .github/workflows/setup-qemu-ci.yml | ||
- setup-qemu/** | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
qemu-version: | ||
- latest | ||
- 4.2.0-7 | ||
steps: | ||
- | ||
name: Runner info | ||
run: | | ||
sudo apt-get install -y hwinfo | ||
sudo hwinfo --short | ||
sudo mount | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2.3.1 | ||
- | ||
name: Set up QEMU | ||
uses: ./setup-qemu/ | ||
with: | ||
qemu-version: ${{ matrix.qemu-version }} |
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,32 @@ | ||
name: setup-qemu-precheckin | ||
|
||
on: | ||
push: | ||
paths: | ||
- .github/workflows/setup-qemu-precheckin.yml | ||
- setup-qemu/** | ||
pull_request: | ||
paths: | ||
- .github/workflows/setup-qemu-precheckin.yml | ||
- setup-qemu/** | ||
|
||
jobs: | ||
pre-checkin: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2.3.1 | ||
- | ||
name: Install | ||
run: yarn --cwd ./setup-qemu/ install | ||
- | ||
name: Pre-checkin | ||
run: yarn --cwd ./setup-qemu/ run pre-checkin | ||
- | ||
name: Check for uncommitted changes | ||
run: | | ||
if [[ `git status --porcelain` ]]; then | ||
git status --porcelain | ||
echo "::warning::Found changes. Please run 'yarn --cwd ./setup-qemu/ run pre-checkin' and push" | ||
fi |
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,15 @@ | ||
# This file is for unifying the coding style for different editors and IDEs. | ||
# More information at http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
/dist/** linguist-generated=true | ||
/lib/** linguist-generated=true |
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,95 @@ | ||
node_modules | ||
lib | ||
|
||
# Jetbrains | ||
/.idea | ||
/*.iml | ||
|
||
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ |
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,11 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"bracketSpacing": false, | ||
"arrowParens": "avoid", | ||
"parser": "typescript" | ||
} |
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,51 @@ | ||
## About | ||
|
||
GitHub Action to install [QEMU static binaries](https://github.com/multiarch/qemu-user-static). | ||
|
||
___ | ||
|
||
* [Usage](#usage) | ||
* [Quick start](#quick-start) | ||
* [Customizing](#customizing) | ||
* [inputs](#inputs) | ||
* [Limitation](#limitation) | ||
|
||
## Usage | ||
|
||
```yaml | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: master | ||
push: | ||
branches: master | ||
tags: | ||
|
||
jobs: | ||
qemu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up QEMU | ||
uses: docker/action/setup-qemu@v2 | ||
with: | ||
qemu-version: latest | ||
``` | ||
## Customizing | ||
### inputs | ||
Following inputs can be used as `step.with` keys | ||
|
||
| Name | Type | Default | Description | | ||
|------------------|---------|-----------|------------------------------------| | ||
| `qemu-version` | String | `latest` | [qemu-user-static](https://github.com/multiarch/qemu-user-static) version (Docker tag). Example: `4.2.0-7` | | ||
|
||
## Limitation | ||
|
||
This action is only available for Linux [virtual environments](https://help.github.com/en/articles/virtual-environments-for-github-actions#supported-virtual-environments-and-hardware-resources). |
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,17 @@ | ||
# https://help.github.com/en/articles/metadata-syntax-for-github-actions | ||
name: 'Docker - Setup QEMU' | ||
description: 'GitHub Action to install QEMU static binaries' | ||
author: 'crazy-max' | ||
branding: | ||
color: 'blue' | ||
icon: 'truck' | ||
|
||
inputs: | ||
qemu-version: | ||
description: 'QEMU static binaries Docker image version. Example: 4.2.0-7' | ||
default: 'latest' | ||
required: false | ||
|
||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' |
Oops, something went wrong.