Template:Gha outputs

From wikieduonline
Revision as of 10:50, 21 October 2024 by Welcome (talk | contribs) (Created page with " jobs: job1: runs-on: ubuntu-latest # Map a step output to a job output outputs: output1: ${{ steps.step1.outputs.test }} output2:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
jobs:
  job1:
    runs-on: ubuntu-latest
    # Map a step output to a job output
    outputs:
      output1: $Template:Steps.step1.outputs.test
      output2: $Template:Steps.step2.outputs.test
    steps:
      - id: step1
        run: echo "test=hello" >> "$GITHUB_OUTPUT"
      - id: step2
        run: echo "test=world" >> "$GITHUB_OUTPUT"
  job2:
    runs-on: ubuntu-latest
    needs: job1
    steps:
      - env:
          OUTPUT1: $Template:Needs.job1.outputs.output1
          OUTPUT2: $Template:Needs.job1.outputs.output2
        run: echo "$OUTPUT1 $OUTPUT2"

Advertising: