forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.11 KB
/
build.yml
File metadata and controls
43 lines (42 loc) · 1.11 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
41
42
43
name: Run unit tests
on:
workflow_call:
inputs:
source-key:
description: Artifact name for source directory
type: string
required: false
default: source
build-cmd:
description: Build command
required: false
type: string
outputs:
built-key:
description: Artifact name for built directory
value: ${{ jobs.build.outputs.built-key }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
built-key: ${{ inputs.build-cmd && steps.save.outputs.name || inputs.source-key }}
steps:
- name: Checkout
if: ${{ inputs.build-cmd }}
uses: actions/checkout@v6
- name: Restore source
if: ${{ inputs.build-cmd }}
uses: ./.github/actions/load
with:
name: ${{ inputs.source-key }}
- name: Build
if: ${{ inputs.build-cmd }}
run: ${{ inputs.build-cmd }}
- name: 'Save working directory'
id: save
if: ${{ inputs.build-cmd }}
uses: ./.github/actions/save
with:
prefix: 'build-'