Skip to content

Build and push containers #163

Build and push containers

Build and push containers #163

# Build our container for running kickstart tests and push that to our quay.io repository
# We cannot fully self-validate the new container, as running all kickstart tests just takes too long.
# So tag the containers by build date, so that in the worst case we can always reset :latest to the previously working tag.
name: Build and push containers
on:
schedule:
- cron: 0 18 * * 6
# be able to start this action manually from a actions tab when needed
workflow_dispatch:
jobs:
runner:
name: Build kstest-runner container
runs-on: ubuntu-latest
environment: quay.io
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Login to container registry
run: docker login -u ${{ secrets.QUAY_USERNAME }} -p ${{ secrets.QUAY_PASSWORD }} quay.io
- name: Build and push container
run: |
TAG=$(date --iso-8601)
NAME=quay.io/rhinstaller/kstest-runner
docker build -t $NAME:$TAG containers/runner
docker tag $NAME:$TAG $NAME:latest
docker push $NAME:$TAG
docker push $NAME:latest