Skip to content

Integrate Drift Manager #24

Integrate Drift Manager

Integrate Drift Manager #24

---
name: "Rebake Tag"
on: # yamllint disable-line rule:truthy
# TBD: Enable `push` event only
- "pull_request"
- "workflow_call"
- "workflow_dispatch"
# push:
# tags:
# - "nautobot-app-v*"
jobs:
# ci:
# uses: "nautobot/cookiecutter-nautobot-app/.github/workflows/ci.yaml@develop"
rebake:
# needs: "ci"
runs-on: "ubuntu-22.04"
strategy:
matrix:
name:
- "firewall-models"
steps:
- name: "Invoke Workflow"
env:
GH_TOKEN: "${{ secrets.GH_NAUTOBOT_BOT_TOKEN }}"
# GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
# TBD: Replace template-ref with tag name
# run_id=$( \
# gh workflow run \
# --repo="nautobot/nautobot-app-${{ matrix.name }}" \
# --field="draft=true" \
# --field="template-ref=develop" \
# ".github/workflows/rebake.yml" \
# | \
# awk '/Run ID/{print $3}' \
# )
run_output=$( \
gh workflow run \
--repo="nautobot/nautobot-app-${{ matrix.name }}" \
--field="draft=true" \
--field="template-ref=develop" \
".github/workflows/rebake.yml" \
)
echo "RUN OUTPUT $run_output"
run_id=$(echo $run_output | awk '/Run ID/{print $3}')
echo "run_id: $run_id"
gh run watch --exit-status $run_id