Skip to content

Instantly share code, notes, and snippets.

@northtyphoon
Last active December 23, 2022 21:24
Show Gist options
  • Save northtyphoon/f3e3aead9fcfde62afae8eced2c36a18 to your computer and use it in GitHub Desktop.
Save northtyphoon/f3e3aead9fcfde62afae8eced2c36a18 to your computer and use it in GitHub Desktop.
version: v1.1.0

alias:
  values:
    oras: ghcr.io/oras-project/oras:v0.16.0

steps:
  # write artifact.txt to current working folder
  - cmd: bash -c 'echo "hello-world" > ./artifact.txt'
  # read artifact.txt from current working folder
  - cmd: bash -c 'cat ./artifact.txt'
  # push artifact.txt from current working folder
  - cmd: |
      oras push \
      {{.Run.Registry}}/samples/artifact:1.0 \
      --config /dev/null:application/vnd.unknown.v1 \
      ./artifact.txt:application/vnd.unknown.layer.v1+txt
  # write dockerfile to current working folder
  - cmd: bash -c 'echo "FROM mcr.microsoft.com/hello-world" > ./hello-world.dockerfile'
  # read dockerfile from current working folder
  - cmd: bash -c 'cat ./hello-world.dockerfile'
  # push dockerfile from current working folder
  - cmd: |
      oras push \
      {{.Run.Registry}}/samples/dockerfile:1.0 \
      ./hello-world.dockerfile

az acr run -r myregistry -f acb.yaml /dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment