Skip to content

Update images

Update images #3

Workflow file for this run

name: Update images
on:
workflow_dispatch:
schedule:
- cron: '00 10 * * 1-5'
permissions:
contents: read
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
packages: read
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: Setup Flux
uses: fluxcd/flux2/action@5c5c15ea212b8f029a110f9975851d25c8272695 #v2.2.2
- name: Write image files
id: update
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY: ghcr.io/controlplaneio-fluxcd
run: |
VERSION=$(gh release view --json tagName -q '.tagName')
echo "version=${VERSION}" >> $GITHUB_ENV
VARIANT="alpine" \
REGISTRY="${REGISTRY}" \
VERSION="${VERSION}" \
.github/workflows/index-images.sh
VARIANT="distroless" \
REGISTRY="${REGISTRY}" \
VERSION="${VERSION}" \
.github/workflows/index-images.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
Update images for Flux ${{ steps.update.outputs.version }}
committer: GitHub <[email protected]>
signoff: true
branch: update-images-${{ steps.update.outputs.version }}
title: Update images for Flux ${{ steps.update.outputs.version }}
body: |
Update images with digests for Flux ${{ steps.update.outputs.version }}
labels: |
area/images