-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (55 loc) · 1.61 KB
/
ci-libs-metadata-v2.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Generate meta file
# Controls when the workflow will run
on:
workflow_call:
inputs:
ENVIRONMENT:
required: false
type: string
description: Environment where the variables and secrets are scoped to
RUNNER:
required: false
default: ubuntu-latest
type: string
description: A GitHub runner type
ARTIFACT_NAME:
required: true
default: ''
description: The artifact name to pull from a previous step
type: string
FILE_PATH_PREFIX:
required: true
default: ''
description: A prefix to append to meta file.
type: string
OS_PLATFORM:
required: true
description: OS/Codename/Arch
default: amd64
type: string
outputs:
TIME:
value: ${{ jobs.meta.outputs.current_time }}
jobs:
meta:
runs-on: ${{ inputs.RUNNER }}
name: Generate metadata for ${{ inputs.LIB_NAME }}
environment: ${{ inputs.ENVIRONMENT }}
steps:
# - name: Static time
# id: time
# run: |
# echo current_time=$(date "+%Y.%m.%d-%H.%M.%S") >> $GITHUB_ENV
# echo current_time=$(date "+%Y.%m.%d-%H.%M.%S") >> $GITHUB_OUTPUT
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: ${{ inputs.ARTIFACT_NAME }}
- name: Generate file
run: |
echo "${{inputs.FILE_PATH_PREFIX}}" > metafile.txt
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.OS_PLATFORM }}-meta
path: |
metafile.txt