Skip to content

Commit

Permalink
Remove os limitation
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Apr 16, 2021
1 parent 25f0500 commit a003090
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 15 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -43,3 +43,31 @@ jobs:
-
name: Dump context
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
5 changes: 0 additions & 5 deletions README.md
Expand Up @@ -19,7 +19,6 @@ ___
* [Customizing](#customizing)
* [inputs](#inputs)
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
* [Limitation](#limitation)

## Usage

Expand Down Expand Up @@ -82,7 +81,3 @@ updates:
schedule:
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 changes: 4 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions src/main.ts
@@ -1,4 +1,3 @@
import * as os from 'os';
import * as mexec from './exec';
import * as core from '@actions/core';
import * as exec from '@actions/exec';
Expand All @@ -10,10 +9,10 @@ interface Platforms {

async function run(): Promise<void> {
try {
if (os.platform() !== 'linux') {
core.setFailed('Only supported on linux platform');
return;
}
core.startGroup(`Docker info`);
await exec.exec('docker', ['version']);
await exec.exec('docker', ['info']);
core.endGroup();

const image: string = core.getInput('image') || 'tonistiigi/binfmt:latest';
const platforms: string = core.getInput('platforms') || 'all';
Expand Down

0 comments on commit a003090

Please sign in to comment.