Skip to content

Set random UI colour #11017

Set random UI colour

Set random UI colour #11017

Workflow file for this run

name: Set random UI colour
on:
workflow_dispatch:
schedule:
- cron: "0 */1 * * *" # Every hour, on the hour
jobs:
change-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: feat/random-ui-colour
- name: Generate random hex colour
id: "generate_random_hex"
run: |
hex="$(openssl rand -hex 3)"
echo "Output [$hex]"
echo "hex=$hex" >> $GITHUB_OUTPUT
- name: Set hex colour in properties file
run: |
echo "PODINFO_UI_COLOR=#${{steps.generate_random_hex.outputs.hex}}" > gitops-config/podinfo.properties
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
with:
new_branch: feat/random-ui-colour
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "Change Podinfo UI colour to #${{steps.generate_random_hex.outputs.hex}}"