-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (47 loc) · 1.4 KB
/
tag-nautobot-app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
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