Skip to content

Release Prep (Manual Test) #4

Release Prep (Manual Test)

Release Prep (Manual Test) #4

Workflow file for this run

name: Test Updatecli Version Update
on:
workflow_dispatch:
inputs:
service_name:
description: "Name of the service to update"
type: string
required: true
version:
description: "Version to set for the service"
type: string
required: true
permissions:
contents: write
jobs:
update_version:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@v2
- name: Generate UTC timestamp
id: timestamp
run: echo "ts=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Create Updatecli config dynamically
run: |
cat <<'EOF' > updatecli.yaml
name: "Update version in versions.md"
sources:
new_version:
kind: shell
spec:
command: "echo ${{ github.event.inputs.version }}"
timestamp:
kind: shell
spec:
command: "echo ${{ steps.timestamp.outputs.ts }}"
targets:
update_markdown:
kind: file
spec:
file: "versions.md"
matchpattern: "^\\| ${{ github.event.inputs.service_name }}\\s*\\|.*$"
replacepattern: "| ${{ github.event.inputs.service_name }} | {{ source \"new_version\" }} | {{ source \"timestamp\" }} |"
actions:
default:
kind: github/pullrequest
spec:
title: "chore: update ${{ github.event.inputs.service_name }} → ${{ github.event.inputs.version }}"
labels:
- update
EOF
- name: Run Updatecli Apply
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
updatecli apply --config updatecli.yaml --clean=true