-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (43 loc) · 1.26 KB
/
ChartOfed.yaml
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
name: Chart OFED
env:
CHART_PATH: ofed-driver/chart
on:
workflow_dispatch:
inputs:
ref:
description: 'tag, sha, branch'
required: true
default: main
push:
tags:
- ofed-driver-v[0-9]+.[0-9]+.[0-9]+
permissions: write-all
jobs:
get_info:
runs-on: ubuntu-latest
outputs:
chart_path: ${{ env.chart_path }}
code_sha: ${{ env.code_sha }}
steps:
- name: Get information
id: get_original_ref
run: |
echo '${{ toJSON(github) }}'
if ${{ github.event_name == 'workflow_dispatch' }}; then
echo "call by workflow_dispatch"
echo "code_sha=${{ github.event.inputs.ref }}" >> $GITHUB_ENV
echo "chart_path=${{ env.CHART_PATH }}" >> $GITHUB_ENV
elif ${{ github.event_name == 'push' }} ; then
echo "call by push tag"
echo "code_sha=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "chart_path=${{ env.CHART_PATH }}" >> $GITHUB_ENV
else
exit 1
fi
call-workflow:
needs: [get_info]
uses: ./.github/workflows/callBuildImage.yaml
with:
code_sha: ${{ needs.get_info.outputs.code_sha }}
chart_path: ${{ needs.get_info.outputs.chart_path }}
secrets: inherit