Skip to content

Update Operand Manifests #41

Update Operand Manifests

Update Operand Manifests #41

name: Update Operand Manifests
on:
workflow_dispatch:
inputs:
ref:
description: "Tag or branch of the midstream fork to use"
required: false
default: "main"
schedule:
- cron: "0 6 * * *"
permissions:
contents: write
pull-requests: write
jobs:
update-manifests:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
with:
app-id: ${{ secrets.ODH_RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.ODH_RELEASE_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Update operand manifests
env:
MCPLO_REF: ${{ github.event.inputs.ref || 'main' }}
run: make update-operand-manifests MCPLO_REF="$MCPLO_REF"
- name: Check for changes
id: changes
run: |
if git diff --quiet internal/controller/resources/mcp-lifecycle-operator.yaml; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Create Pull Request
if: steps.changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: "chore: update operand manifests from midstream"
title: "chore: update operand manifests from midstream"
body: |
Automated update of operand manifests from `${{ github.event.inputs.ref || 'main' }}` branch of the midstream fork.
branch: automated/update-operand-manifests
delete-branch: true