Skip to content

initial typescript action test #17

initial typescript action test

initial typescript action test #17

Workflow file for this run

name: Hi Mascot
on: push
# global env var
env:
mascot: Mona
defaults:
run:
shell: bash
jobs:
windows_job:
name: Windows Job
runs-on: ubuntu-latest
steps:
- name: uses wf env
run: echo 'Hi ${{ env.mascot }}' # Hi Mona
- name: uses step env
run: echo 'Hi ${{ env.mascot }}' # Hi Octocat
env:
mascot: Octocat
# - name: generate config block
# id: config
# run: |
# echo '{"mascot": "Octocat"}' > config.json
- name: checkout local repo for actions
uses: actions/checkout@v4
- name: create and upload config object
id: config
uses: ./actions/example-config-updater
- name: read the outputs
run: |
echo 'config: ${{ steps.config.outputs.config }}'
echo 'art: ${{ steps.config.outputs.artifactId }}'
# linux_job:
# name: Linux Job
# runs-on: ubuntu-latest
# needs: windows_job
# env:
# mascot: Tux
# outputs:
# mascot: ${{ steps.outstep.outputs.mascot }}
# steps:
# - name: uses job env
# run: echo 'Hi ${{ env.mascot }}' # Hi Tux
# - name: set gritty env var
# run: echo "mascot=Gritty" >> $GITHUB_ENV
# - name: uses changed job env
# run: echo 'Hi ${{ env.mascot }}' # Hi Gritty
# - name: uses step env
# run: echo "Hi ${{ env.mascot }}" # Hi Mika
# env:
# mascot: Mika
# - name: uses job env again
# run: echo 'Hi ${{ env.mascot }}' # Hi Gritty
# - name: set output using job env
# id: outstep # <-- note the ID here, needed for the output definition
# run: echo "mascot=$mascot" >> $GITHUB_OUTPUT # Gritty
# macos_job:
# name: macOS Job
# runs-on: ubuntu-latest
# needs: [windows_job, linux_job]
# steps:
# - name: global env var not changed by previous job
# run: echo 'Hi ${{ env.mascot }}' # Hi Mona
# - name: Use prior job output to pass data around
# run: echo 'Hi ${{ needs.linux_job.outputs.mascot }}' # Hi Gritty