Skip to content

This action allows you to run `Dockerfile`/`Containerfile` commands directly on a local or remote host system without using Docker or Podman

Notifications You must be signed in to change notification settings

gbraad-actions/machinefile-executor-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Machinefile executor GitHub Action

Machinefile test

This action uses the Machinefile executor 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

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:

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

- name: Setup with local runner
  uses: gbraad-actions/machinefile-executor-action@main
  with:
    containerfile: Containerfile
    context: .
    runner: local

Podman runner

- 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

- 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

Author

"Gerard Braad"
@gbraad

About

This action allows you to run `Dockerfile`/`Containerfile` commands directly on a local or remote host system without using Docker or Podman

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published