-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (79 loc) · 2.85 KB
/
main.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
run: ["run1", "run2"]
env:
BASE_REF: "DEFAULT"
steps:
- name: env Read
run: echo "BASE REF ${BASE_REF}"
- name: env set 1
env:
BASE_REF: "A"
run: echo "BASE REF ${BASE_REF}"
- name: env Read
run: echo "BASE REF ${BASE_REF}"
- name: upper env
id: out
run: echo "USER_API_SECRET=1df39587a8044b57640c2e1d3fe8991b" >> $GITHUB_OUTPUT
- name: show upper
run: echo "${{ steps.out.outputs.USER_API_SECRET }}"
- name: Check folder
run: mkdir auto
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Print repo name
run: echo ${{ github.repository }}
- name: Print github_ref
run: echo ${{ github.ref }}
- name: Print github_ref
run: echo ${{ github.ref_name }}
- name: Inspect
run: ls -l
- name: Print workspace path
run: echo ${{ github.workspace }}
- uses: actions/checkout@v4
with:
repository: TykTechnologies/tyk
path: tyk
- name: Print workspace path
run: echo ${{ github.workspace }}
- name: Inspect
run: ls -l
- name: Print github_base_ref
run: echo ${{ github.base_ref }}
- name: Print github_event
run: echo ${{ github.event_name }}
# - name: Create json
# run: |
# echo '{ "myatt": "value1" }' > /tmp/report_with_metadata.json
# - name: Install MongoImport
# run: |
# sudo apt-get update
# sudo apt-get install gnupg curl
# curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
# echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
# sudo apt-get update
# sudo apt-get install -y mongodb-org-tools
# - name: Install MongoImport
# run: |
# wget -O "mongo.deb" 'https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.4.deb'
# sudo dpkg -i "mongo.deb"
# - name: Insert into MongoDB
# run: mongoimport --uri="mongodb+srv://mongo:${{ secrets.MONGO_PASS }}@tyk-ci.pzeexqy.mongodb.net/test" --collection=test_report --file=/tmp/report_with_metadata.json