Skip to content

try2

try2 #50

# This is a basic workflow to help you get started with Actions
name: MatrixOutputs
# 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 ]
jobs:
job1:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
envfiles: ["myenvfile"]
# job: ["instance_a","instance_b","instance_c"]
# title: ["title1", "title2"]
# exclude: []
steps:
- uses: actions/checkout@v4
- name: Execute UI tests
env:
GW_URL: 'https://localhost:8080/'
NODE_TLS_REJECT_UNAUTHORIZED: 0
UI_MARKERS: ${{ matrix.envfiles && format('--grep {0}', matrix.envfiles ) || '' }}
run: echo $UI_MARKERS
# - name: set params
# id: params
# run: |
# echo "var_a=${{ matrix.job }}" >> $GITHUB_OUTPUT
# sleep $[ ( $RANDOM % 10 ) + 1 ]s
# - name: show params
# run: |
# echo "var_a=${{ steps.params.outputs.var_a }}"
# - name: set params 2
# id: params_b
# run: |
# echo "var_a=${{ matrix.job }}-paramB" >> $GITHUB_OUTPUT
# sleep $[ ( $RANDOM % 10 ) + 1 ]s
# - name: show params 2
# run: |
# echo "var_a=${{ steps.params.outputs.var_a }}"
# echo "var_a=${{ steps.params_b.outputs.var_a }}"
# - name: Show github vars
# run: |
# echo "${{ github.repository }}_${{ github.run_id }}_${{ github.run_number }}-${{ github.run_attempt }}"
# - name: try job name
# env:
# MY_DATE: $(date +%s%N)
# run: |
# # Both work:
# echo "MY DATE is $MY_DATE"
# echo "Job name is $GITHUB_JOB"
# echo "How about ${{ github.jobs[github.job].name }}"
# echo "How about github.job ${{ github.job }}"
# if [[ "${{ runner.debug }}" == "1" ]]; then
# echo "IS DEBUG"
# fi
# - name: Get timestamp hash
# run: |
# echo "${{matrix.job}}" >> README.md
# touch ${{matrix.job}}
# cat README.md
# ls -lR
# echo "TMP"
# touch /tmp/${{matrix.job}}
# ls -lR /tmp/instance_*
# echo "WORKSPACE"
# touch ${{github.workspace}}/${{matrix.job}}
# ls -lR ${{github.workspace}}