-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
40 lines (37 loc) · 1.35 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
name: "List Make Prerequisites Action"
description: "List all prerequisites of a Makefile target"
author: "Luca Colagrande"
inputs:
target:
description: "Target to list prerequisites for"
required: true
working-directory:
description: "Working directory to run Make in"
required: false
default: '.'
flags:
description: "Additional flags to pass to list-make-prerequisites.py"
required: false
default: ''
outputs:
hash:
description: "Hash of all prerequisite file contents"
value: ${{ steps.list-make-prerequisites.outputs.hash }}
prerequisites:
description: "List of all prerequisite files"
value: ${{ steps.list-make-prerequisites.outputs.prerequisites }}
runs:
using: "composite"
steps:
- name: Install Dependencies
shell: bash
run: python -m pip install -r ${GITHUB_ACTION_PATH}/requirements.txt
- name: List Make Prerequisites
id: list-make-prerequisites
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
hash=$(${GITHUB_ACTION_PATH}/list-make-prerequisites.py ${{ inputs.target }} ${{ inputs.flags }} --hash)
prerequisites=$(${GITHUB_ACTION_PATH}/list-make-prerequisites.py ${{ inputs.target }} ${{ inputs.flags }} | xargs)
echo "hash=$hash" >> $GITHUB_OUTPUT
echo "prerequisites=$prerequisites" >> $GITHUB_OUTPUT