Skip to content

Rebake Cookie

Rebake Cookie #5

Workflow file for this run

---
name: "Rebake Cookie"
on: # yamllint disable-line rule:truthy
schedule:
# Every Saturday at 5:00 am UTC
- cron: "0 5 * * 6"
workflow_dispatch:
inputs:
template-ref:
description: "The branch or tag to use for the template, using the value from .cookiecutter.json when empty"
default: ""
jobs:
rebake:
runs-on: "ubuntu-22.04"
permissions:
actions: "write"
contents: "write"
packages: "read"
pull-requests: "write"
container: "ghcr.io/nautobot/cookiecutter-nautobot-app-drift-manager/prod:latest"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- name: "Configure"
id: "config"
run: |
export REBAKE_ARGS='--push'
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
export REBAKE_ARGS="$REBAKE_ARGS --template-ref='${{ github.event.inputs.template-ref }}'"
fi
echo "rebake-args='$REBAKE_ARGS'" >> $GITHUB_OUTPUT
- name: "Rebake"
run: |
python -m ntc_cookie_drift_manager rebake ${{ steps.config.outputs.rebake-args }} '${{ github.repositoryUrl }}'