push-to-registry/.github/workflows/verify-push.yaml
Tim Etchells 2d063fde99 Add digestfile argument, input, and output
Signed-off-by: Tim Etchells <tetchell@redhat.com>
2021-01-08 17:38:46 +05:30

39 lines
1.2 KiB
YAML

# This workflow will perform a test whenever there
# is some change in code done to ensure that the changes
# are not buggy and we are getting the desired output.
name: Test Push
on: [ push, pull_request, workflow_dispatch ]
env:
IMAGE_NAME: hello-world
IMAGE_REGISTRY: quay.io
IMAGE_TAG: latest
jobs:
build:
name: Push image to Quay.io
runs-on: ubuntu-20.04
steps:
# Checkout push-to-registry action github repository
- name: Checkout Push to Registry action
uses: actions/checkout@v2
# Pull hello-world image to push in next step
- name: Pull Hello world image
run: docker pull ${{ env.IMAGE_NAME }}
# Push the image to image registry
- name: Push To Quay
uses: ./
id: push
with:
image: ${{ env.IMAGE_NAME }}
tag: ${{ env.IMAGE_TAG }}
registry: ${{ env.IMAGE_REGISTRY }}/${{ secrets.REGISTRY_USER }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Echo outputs
run: |
echo "registry-path ${{ steps.push.outputs.registry-path }}"
echo "digest ${{ steps.push.outputs.digest }}"