Set random UI colour #11011
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}}" |