Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 50 additions & 6 deletions .github/workflows/python-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,56 @@ name: Installing Python

on: [push]

# jobs:
# build:
# strategy:
# matrix:
# os:
# - ubuntu-latest
# #- macos-12
# #- windows-latest
# py-version:
# - 3.7
# - 3.8
# - 3.9
# # exclude: #added
# # - os: macos-12 #added
# # py-version: 3.9 #added
# runs-on: '${{ matrix.os }}'
# steps:
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '${{ matrix.py-version }}'

# - uses: actions/checkout@v4.1.1

# - run: |
# issue_title="${{ github.event.issue.title }}"
# if [[ "$issue_title" == *"bug"* ]]; then
# echo "Issue is about a bug!"
# else
# echo "Issue is not about a bug"
# fi

jobs:
build:
job1:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
step1_output: ${{ steps.step1.outputs.MyVar }}
step2_output: ${{ steps.step2.outputs.MySecret }}
steps:
- id: step1
run: echo "MyVar=hello world." >> "$GITHUB_OUTPUT"
- id: step2
run: echo "MySecret=Welcome to GitHub Actions !!" >> "$GITHUB_OUTPUT"
job2:
runs-on: ubuntu-latest
needs: job1
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7

- env:
OUTPUT1: ${{needs.job1.outputs.step1_output}}
OUTPUT2: ${{needs.job1.outputs.step2_output}}
run: echo "$OUTPUT1 $OUTPUT2"