Skip to content

freshen-images

freshen-images #54

name: freshen-images
on:
workflow_dispatch:
inputs:
force:
description: Force rebuild of all images.
default: ''
required: false
schedule:
# Run at 11 am UTC every day.
- cron: '0 11 * * *'
jobs:
git_tags:
runs-on: ubuntu-20.04
outputs:
git_tags: ${{ steps.tags.outputs.git_tags }}
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- id: tags
run: echo ::set-output name=git_tags::$(.github/workflows/freshen-images/tags.sh)
build:
name: build
needs: git_tags
runs-on: ubuntu-20.04
environment: deploy
strategy:
matrix:
# TODO(estroz): support scorecard-test-kuttl rebuilds.
id: ["operator-sdk", "ansible-operator", "helm-operator", "scorecard-test"]
steps:
- name: set up qemu
uses: docker/setup-qemu-action@v1
- name: set up buildx
uses: docker/setup-buildx-action@v1
- name: quay.io login
uses: docker/login-action@v1
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: build and push
id: build_ids
run: |
.github/workflows/freshen-images/build.sh --push \
--image-id ${{ matrix.id }} \
--tags ${{ needs.git_tags.outputs.git_tags }} \
${{ github.event.inputs.force != '' && '--force' || '' }}