Skip to content

freshen-images

freshen-images #21

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-22.04
outputs:
git_tags: ${{ steps.tags.outputs.git_tags }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- id: tags
run: echo "git_tags=$(.github/workflows/freshen-images/tags.sh)" >> $GITHUB_OUTPUT
build:
name: build
needs: git_tags
runs-on: ubuntu-22.04
environment: deploy
strategy:
matrix:
# TODO(estroz): support scorecard-test-kuttl rebuilds.
id: ["operator-sdk", "helm-operator", "scorecard-test"]
steps:
- name: set up qemu
uses: docker/setup-qemu-action@v2
- name: set up buildx
uses: docker/setup-buildx-action@v3
- name: quay.io login
uses: docker/login-action@v2
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: checkout
uses: actions/checkout@v3
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' || '' }}