mirror of
https://github.com/docker/setup-qemu-action.git
synced 2024-12-22 23:25:29 +00:00
Merge pull request #30 from crazy-max/remove-limitation
Remove os limitation
This commit is contained in:
commit
a803c66e06
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
|
@ -43,3 +43,31 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Dump context
|
name: Dump context
|
||||||
uses: crazy-max/ghaction-dump-context@v1
|
uses: crazy-max/ghaction-dump-context@v1
|
||||||
|
|
||||||
|
error:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Stop docker
|
||||||
|
run: |
|
||||||
|
sudo systemctl stop docker
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
id: qemu
|
||||||
|
continue-on-error: true
|
||||||
|
uses: ./
|
||||||
|
-
|
||||||
|
name: Check
|
||||||
|
run: |
|
||||||
|
echo "${{ toJson(steps.qemu) }}"
|
||||||
|
if [ "${{ steps.qemu.outcome }}" != "failure" ] || [ "${{ steps.qemu.conclusion }}" != "success" ]; then
|
||||||
|
echo "::error::Should have failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
-
|
||||||
|
name: Dump context
|
||||||
|
if: always()
|
||||||
|
uses: crazy-max/ghaction-dump-context@v1
|
||||||
|
|
|
@ -19,7 +19,6 @@ ___
|
||||||
* [Customizing](#customizing)
|
* [Customizing](#customizing)
|
||||||
* [inputs](#inputs)
|
* [inputs](#inputs)
|
||||||
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
|
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
|
||||||
* [Limitation](#limitation)
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -82,7 +81,3 @@ updates:
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Limitation
|
|
||||||
|
|
||||||
This action is only available for Linux [virtual environments](https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-virtual-environments-and-hardware-resources).
|
|
||||||
|
|
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
|
@ -90,17 +90,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const os = __importStar(__webpack_require__(87));
|
|
||||||
const mexec = __importStar(__webpack_require__(757));
|
const mexec = __importStar(__webpack_require__(757));
|
||||||
const core = __importStar(__webpack_require__(186));
|
const core = __importStar(__webpack_require__(186));
|
||||||
const exec = __importStar(__webpack_require__(514));
|
const exec = __importStar(__webpack_require__(514));
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
if (os.platform() !== 'linux') {
|
core.startGroup(`Docker info`);
|
||||||
core.setFailed('Only supported on linux platform');
|
yield exec.exec('docker', ['version']);
|
||||||
return;
|
yield exec.exec('docker', ['info']);
|
||||||
}
|
core.endGroup();
|
||||||
const image = core.getInput('image') || 'tonistiigi/binfmt:latest';
|
const image = core.getInput('image') || 'tonistiigi/binfmt:latest';
|
||||||
const platforms = core.getInput('platforms') || 'all';
|
const platforms = core.getInput('platforms') || 'all';
|
||||||
core.startGroup(`Pulling binfmt Docker image`);
|
core.startGroup(`Pulling binfmt Docker image`);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import * as os from 'os';
|
|
||||||
import * as mexec from './exec';
|
import * as mexec from './exec';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
|
@ -10,10 +9,10 @@ interface Platforms {
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
if (os.platform() !== 'linux') {
|
core.startGroup(`Docker info`);
|
||||||
core.setFailed('Only supported on linux platform');
|
await exec.exec('docker', ['version']);
|
||||||
return;
|
await exec.exec('docker', ['info']);
|
||||||
}
|
core.endGroup();
|
||||||
|
|
||||||
const image: string = core.getInput('image') || 'tonistiigi/binfmt:latest';
|
const image: string = core.getInput('image') || 'tonistiigi/binfmt:latest';
|
||||||
const platforms: string = core.getInput('platforms') || 'all';
|
const platforms: string = core.getInput('platforms') || 'all';
|
||||||
|
|
Loading…
Reference in a new issue