-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
50 lines (48 loc) · 1.39 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: 'Create a Frozen Micropython Module'
author: 'jsimonrichard'
branding:
icon: 'box'
color: 'blue'
description: 'Freeze a custom module into micropython'
inputs:
filename:
description: "Filename for the output firmware"
required: true
default: "micropython.uf2"
path:
description: "Path to the module within your github repo"
required: true
default: "."
module:
description: "The name of your module"
required: true
port:
description: "The micropython port to use"
required: true
default: "rp2"
cachecode:
description: "Change this if you need to force the creation of a new cache"
required: true
default: "1"
runs:
using: composite
steps:
- name: Check for cached micropython environment
id: cache
uses: actions/cache@v2
with:
path: ~/micropython
key: ${{ runner.os }}-micropython-${{ inputs.port }}-${{ inputs.module }}-${{ inputs.cachecode }}
- name: Build or Restore Environment
shell: bash
env:
INPUT_PORT: ${{ inputs.port }}
CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
run: $GITHUB_ACTION_PATH/setup-env.sh
- shell: bash
env:
INPUT_FILENAME: ${{ inputs.filename }}
INPUT_PATH: ${{ inputs.path }}
INPUT_MODULE_NAME: ${{ inputs.module }}
INPUT_PORT: ${{ inputs.port }}
run: $GITHUB_ACTION_PATH/build.sh