name: Smoke permissions: {} on: workflow_dispatch: inputs: greeting: description: 'Text passed from the first job to the second' required: false type: string default: hello push: branches: - main jobs: produce: runs-on: ubuntu-latest name: Produce an output outputs: greeting: ${{ steps.greeting.outputs.value }} steps: - name: Show the runner run: | uname -a cat /etc/os-release id echo "event=${GITHUB_EVENT_NAME} ref=${GITHUB_REF} sha=${GITHUB_SHA}" echo "server=${GITHUB_SERVER_URL} repository=${GITHUB_REPOSITORY}" command -v sudo docker node php composer || true - name: Set the output id: greeting env: INPUTS_GREETING: ${{ inputs.greeting || 'hello' }} run: echo "value=${INPUTS_GREETING} from ${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT - name: Write the step summary run: echo "### Smoke test ran on ${RUNNER_OS}" >> $GITHUB_STEP_SUMMARY consume: runs-on: ubuntu-latest name: Consume the output needs: produce steps: - name: Print the output of the first job env: GREETING: ${{ needs.produce.outputs.greeting }} run: | test -n "${GREETING}" echo "${GREETING}"