Skip to content

Commit

Permalink
Merge pull request #17 from RedlineTriad/feature/fix-image-path
Browse files Browse the repository at this point in the history
Feature/fix image path
  • Loading branch information
RedlineTriad authored Oct 30, 2022
2 parents 2b4095b + f07305b commit dfaf36a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,6 @@ This GitHub action allows you to run [Molecule](https://molecule.readthedocs.io/
## Usage
To use the action simply create an `main.yml` (or choose custom `*.yml` name) in the `.github/workflows/` directory.

The `molecule.yml` also has to be configured to use QEMU like this:
```yml
driver:
name: vagrant
provider:
name: qemu
platforms:
- name: instance
provider_options:
qemu_dir: /usr/bin/
arch: x86_64
machine: q35
cpu: max
net_device: virtio-net-pci
provider_raw_config_args:
- extra_qemu_args = %w(-vga std)
```

### Basic example:

```yaml
Expand All @@ -96,13 +78,31 @@ jobs:
- uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- uses: redlinetriad/molecule-action@v2
- uses: redlinetriad/molecule-action@v1
```

>NOTE: By default molecule is going to look for configuration at `molecule/*/molecule.yml`, so if option `molecule-working-dir` is not provided,
>checkout action needs to place the file in ${{ github.repository }} in order for Molecule to find your role. If your role is placed somewhere else
>in the repository, ensure that `molecule-working-dir` is set up accordingly, in order to `cd` to that directory before issuing `molecule` command.

The `molecule.yml` also has to be configured to use QEMU like this:
```yml
driver:
name: vagrant
provider:
name: qemu
platforms:
- name: instance
provider_options:
qemu_dir: /usr/bin/
arch: x86_64
machine: q35
cpu: max
net_device: virtio-net-pci
provider_raw_config_args:
- extra_qemu_args = %w(-vga std)
```

### Advanced example:

```yaml
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
with:
path: "${{ github.repository }}"
- name: Molecule
uses: redlinetriad/molecule-vagrant-qemu-action@v0.1.0
uses: redlinetriad/molecule-vagrant-qemu-action@v1
with:
molecule_options: --debug --base-config molecule/_shared/base.yml
molecule_command: test
Expand All @@ -143,7 +143,7 @@ jobs:
ANSIBLE_FORCE_COLOR: '1'
```

> TIP: N.B. Use `redlinetriad/molecule-vagrant-qemu-action@v0.1.0` or any other valid tag, or branch, or commit SHA instead of `v0.1.0` to pin the action to use a specific version.
> TIP: N.B. Use `redlinetriad/molecule-vagrant-qemu-action@v1` or any other valid tag, or branch, or commit SHA instead of `v1` to pin the action to use a specific version.

## Troubleshooting
If you see this error while you executing `apt_key` task
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ inputs:

runs:
using: docker
image: docker://ghcr.io/redlinetriad/molecule-vagrant-qemu-action:v0.1.0
image: docker://ghcr.io/redlinetriad/molecule-vagrant-qemu-action:v1
env:
ANSIBLE_ASYNC_DIR: "/tmp/.ansible_async"
ANSIBLE_FORCE_COLOR: "1"

0 comments on commit dfaf36a

Please sign in to comment.