Skip to content

Commit

Permalink
action: add paths inputs, add example
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Jun 6, 2024
1 parent 1935786 commit d93e71b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,30 @@
**A generation utility for EuroScope Ground Radar and TopSky maps and settings using AIXM and KML.**

## GitHub Action

To run the mapbuilder GitHub action using a cache, see the following example:

```yaml
jobs:
build-maps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore cached sources
uses: actions/cache/restore@v4
with:
path: .cache
key: sources
- name: Run mapbuilder
uses: vatger-nav/mapbuilder@main
with:
# defaults
target-path: '.'
source-path: 'mapdata'
- name: Store cached sources
uses: actions/cache/save@v4
with:
path: .cache
key: sources
```
13 changes: 11 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@
name: 'mapbuilder'
author: 'vatger-nav'
description: 'Builder for GRPlugin and Topsky maps'
inputs:
target-path:
description: 'Target directory relative to repository root'
required: True
default: '.'
source-path:
description: 'Source directory with mapbuilder.toml relative to repository root'
required: True
default: 'mapdata'
runs:
using: 'docker'
image: 'docker://ghcr.io/vatger-nav/mapbuilder:main'
args:
- '--debug'
- '-s'
- '/github/workspace/mapdata'
- '/github/workspace'
- '/github/workspace/${{ inputs.source-path }}'
- '/github/workspace/${{ inputs.target-path }}'
branding:
icon: 'map'
color: 'green'

0 comments on commit d93e71b

Please sign in to comment.