-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 1.47 KB
/
Gated-Auto-Merger.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
49
50
51
52
53
54
55
56
name: Gated Auto-Merger
on:
workflow_dispatch:
inputs:
component:
type: choice
description: select component
options:
- Dashboard
env:
METADATA: "data/metadata.yaml"
jobs:
gated-auto-merger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Trigger GAM
env:
HYDRA_TOKEN: ${{ secrets.HYDRA_TOKEN }}
shell: bash
id: trigger_gam
run: |
python src/main.py --component ${{ github.event.inputs.component }}
echo "inside main"
pwd
ls
ls /tmp
- uses: actions/checkout@v3
with:
ref: metadata
path: metadata
- name: Copy metadata Json
id: copy_meta
run: |
meta=$(yq -o json $METADATA)
execution_id=$(echo $meta | jq -r '.metadata.execution_id')
mkdir metadata/${execution_id}
cp data/metadata.yaml metadata/${execution_id}/
echo "inside metadata"
cd metadata/${execution_id}/
cp
pwd
ls
cat metadata.yaml
# - name: Commit and push changes to main branch
# uses: actions-js/push@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: metadata
# message: "Adding ${{ steps.remove_release_from_config.outputs.RELEASE_TO_BE_SETUP }} to releases.yaml"
# repository: red-hat-data-services/rhods-devops-infra