https://github.com/ducttape-infra/machinefile-executor-action
This action allows you to run `Dockerfile`/`Containerfile` commands directly on a local or remote host system without using Docker or Podman
https://github.com/ducttape-infra/machinefile-executor-action
action containerfile docker dockerfile github-actions podman
Last synced: 1 day ago
JSON representation
This action allows you to run `Dockerfile`/`Containerfile` commands directly on a local or remote host system without using Docker or Podman
- Host: GitHub
- URL: https://github.com/ducttape-infra/machinefile-executor-action
- Owner: ducttape-infra
- Created: 2025-03-01T08:11:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-24T06:05:35.000Z (10 months ago)
- Last Synced: 2026-06-25T04:11:25.409Z (5 days ago)
- Topics: action, containerfile, docker, dockerfile, github-actions, podman
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Machinefile executor GitHub Action
==================================
[](https://github.com/gbraad-actions/machinefile-executor-action/actions/workflows/build-process.yml)
This action uses the [Machinefile executor](https://github.com/gbraad-redhat/machinefile) to run `Dockerfile`/`Containerfile` commands directly on the host system without using Docker, Podman or any other container engine. It's useful for executing build commands in a predictable environment or setting up development tools.
## Usage
```yaml
steps:
- uses: actions/checkout@v3
- name: Run Machinefile commands
uses: gbraad-actions/machinefile-executor-action@v3
with:
containerfile: 'Containerfile' # or path to your Containerfile
context: '.' # Build context directory
```
## Inputs
| Input | Description | Required | Default |
|---------------|------------------------------------------|----------|----------------|
| containerfile | Path to the Dockerfile/Containerfile | Yes | 'Containerfile'|
| context | Directory to use as build context | Yes | '.' |
| arguments | Additional arguments to pass | No | '' |
| binarypath | Override the path of executor to use | No | '' |
| version | Version of executor binary to download | No | '0.5.0' |
## Example
Here's an example workflow that uses the Machinefile Executor to set up a development environment:
```yaml
name: Build with Containerfile
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Dockerfile commands
uses: gbraad-actions/machinefile-executor-action@v3
with:
containerfile: 'containers/Containerfile-devtools'
context: '.'
arguments: --arg=USER=gbraad
- name: Run build tests
run: |
# Your build commands here
make test
```
### Local runner
```yaml
- name: Setup with local runner
uses: gbraad-actions/machinefile-executor-action@main
with:
containerfile: Containerfile
context: .
runner: local
```
### Podman runner
```yaml
- name: Setup with Podman runner
uses: gbraad-actions/machinefile-executor-action@main
with:
containerfile: Containerfile
context: .
runner: podman
podman-name: my-container
podman-connection: my-connection
```
### SSH runner
```yaml
- name: Setup with SSH runner
uses: gbraad-actions/machinefile-executor-action@main
with:
containerfile: Containerfile
context: .
runner: ssh
ssh-host: example.com
ssh-user: user
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
args: |
USER=gbraad
GROUP=wheel
```
## License
[MIT License](LICENSE)
## Author
| [](http://gbraad.nl "Gerard Braad ") |
|---|
| [@gbraad](https://gbraad.nl/social) |