Skip to content

Update images

Update images #8

name: Update images
on:
workflow_dispatch:
schedule:
- cron: '00 10 * * 1-5'
permissions:
contents: read
env:
ENTERPRISE_REGISTRY: ghcr.io/controlplaneio-fluxcd
ENTERPRISE_VARIANTS: alpine;distroless
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Login to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_READONLY }}
- name: Latest release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(gh release view --json tagName -q '.tagName')
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Setup Flux
uses: fluxcd/flux2/action@534684601ec8888beb0cc4f51117b59e97606c4d #v2.2.3
with:
version: ${{ steps.release.outputs.version }}
- name: Enterprise images
shell: bash
run: |
for variant in ${ENTERPRISE_VARIANTS//;/$'\n'}
do
DISTRIBUTION="enterprise" \
REGISTRY="${ENTERPRISE_REGISTRY}" \
VARIANT="${variant}" \
VERSION="${{ steps.release.outputs.version }}" \
.github/workflows/update-images.sh
done
- name: Create Pull Request
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
Update images for Flux ${{ steps.release.outputs.version }}
committer: GitHub <[email protected]>
signoff: true
branch: update-images-${{ steps.release.outputs.version }}
title: Update images for Flux ${{ steps.release.outputs.version }}
body: |
Update images with digests for Flux ${{ steps.release.outputs.version }}
labels: |
area/images