2021-08-20 19:19:14 +05:30
|
|
|
name: Test Login and Pull
|
2021-03-30 18:57:12 +05:30
|
|
|
on:
|
|
|
|
push:
|
|
|
|
workflow_dispatch:
|
2021-08-20 19:19:14 +05:30
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *' # every day at midnight
|
2021-03-30 18:57:12 +05:30
|
|
|
|
|
|
|
env:
|
2021-08-20 19:19:14 +05:30
|
|
|
IMAGE_PATH: quay.io/redhat-github-actions/petclinic-private:latest
|
|
|
|
REGISTRY_USER: redhat-github-actions+redhat_actions_ci_puller
|
2021-03-30 18:57:12 +05:30
|
|
|
IMAGE_REGISTRY: quay.io
|
|
|
|
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
|
|
|
|
jobs:
|
2021-08-20 19:19:14 +05:30
|
|
|
podman-pull:
|
|
|
|
name: Log in and pull image with Podman
|
2021-03-30 18:57:12 +05:30
|
|
|
runs-on: ubuntu-20.04
|
2021-09-30 11:13:18 +05:30
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
install_latest: [ true, false ]
|
|
|
|
|
2021-03-30 18:57:12 +05:30
|
|
|
steps:
|
|
|
|
|
2021-04-07 13:01:25 -04:00
|
|
|
- uses: actions/checkout@v2
|
2021-03-30 18:57:12 +05:30
|
|
|
|
2021-09-30 11:13:18 +05:30
|
|
|
- name: Install latest podman
|
|
|
|
if: matrix.install_latest
|
|
|
|
run: |
|
|
|
|
bash .github/install_latest_podman.sh
|
|
|
|
|
2021-04-07 13:01:25 -04:00
|
|
|
- name: Log in to quay.io
|
2021-03-30 18:57:12 +05:30
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
username: ${{ env.REGISTRY_USER }}
|
|
|
|
password: ${{ env.REGISTRY_PASSWORD }}
|
|
|
|
registry: ${{ env.IMAGE_REGISTRY }}
|
2021-08-20 19:19:14 +05:30
|
|
|
|
|
|
|
- name: Pull image with Podman
|
|
|
|
run: podman pull ${{ env.IMAGE_PATH }}
|
|
|
|
|
|
|
|
buildah-pull:
|
|
|
|
name: Log in and pull image with Buildah
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-09-30 11:13:18 +05:30
|
|
|
- name: Install latest podman
|
|
|
|
if: matrix.install_latest
|
|
|
|
run: |
|
|
|
|
bash .github/install_latest_podman.sh
|
|
|
|
|
2021-08-20 19:19:14 +05:30
|
|
|
- name: Log in to quay.io
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
username: ${{ env.REGISTRY_USER }}
|
|
|
|
password: ${{ env.REGISTRY_PASSWORD }}
|
|
|
|
registry: ${{ env.IMAGE_REGISTRY }}
|
|
|
|
|
|
|
|
- name: Pull image with Buildah
|
|
|
|
run: buildah pull ${{ env.IMAGE_PATH }}
|