-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
40 lines (37 loc) · 1.25 KB
/
action.yml
File metadata and controls
40 lines (37 loc) · 1.25 KB
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 Package
shell: bash
run: python -m pip install .
- name: List Make Prerequisites
id: list-make-prerequisites
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
hash=$(list-make-prerequisites ${{ inputs.target }} ${{ inputs.flags }} --hash)
prerequisites=$(list-make-prerequisites ${{ inputs.target }} ${{ inputs.flags }} | xargs)
echo "hash=$hash" >> $GITHUB_OUTPUT
echo "prerequisites=$prerequisites" >> $GITHUB_OUTPUT