a #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |