apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: print-date
  annotations:
    description: |
      A simple task that prints the date.
spec:
  results:
    - name: current-date-unix-timestamp
      description: The current date in unix timestamp format
    - name: current-date-human-readable
      description: The current date in human readable format
  steps:
    - name: print-date-unix-timestamp
      image: bash:latest
      script: |
        #!/usr/bin/env bash
        date +%s | tee /tekton/results/current-date-unix-timestamp
    - name: print-date-human-readable
      image: bash:latest
      script: |
        #!/usr/bin/env bash
        date | tee /tekton/results/current-date-human-readable

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  generateName: print-date-
spec:
  taskSpec:
    description: |
      A simple task that prints the date.
    results:
      - name: current-date-unix-timestamp
        description: The current date in unix timestamp format
      - name: current-date-human-readable
        description: The current date in human readable format
    steps:
      - name: print-date-unix-timestamp
        image: bash:latest
        script: |
          #!/usr/bin/env bash
          date +%s | tee /tekton/results/current-date-unix-timestamp
      - name: print-date-human-readable
        image: bash:latest
        script: |
          #!/usr/bin/env bash
          date | tee /tekton/results/current-date-human-readable

Make this example actually run 🏃
Make this example actually run 🏃

The examples should at the least contain Runs that execute them (and
even better, should include an assertion that verifies they did what was
expected) otherwise all that is being verified is that the spec is
valid.
