mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-29 15:20:17 +00:00
Merge pull request #93 from prometheus-community/superq/fixup_discover
skip_changelog: Fix workflow outputs syntax
This commit is contained in:
commit
5c5f1f725d
2 changed files with 13 additions and 7 deletions
14
.github/scripts/discover_role_repos.sh
vendored
14
.github/scripts/discover_role_repos.sh
vendored
|
@ -1,6 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Description: Discover the upstream repo from each role default vars.
|
||||||
|
|
||||||
for defaults_file in roles/*/vars/main.yml ; do
|
result=$(
|
||||||
role="$(echo "${defaults_file}" | cut -f2 -d'/')"
|
for defaults_file in roles/*/vars/main.yml ; do
|
||||||
yq eval "[{\"repo\": ._${role}_repo, \"role\": \"${role}\"}]" "${defaults_file}"
|
role="$(echo "${defaults_file}" | cut -f2 -d'/')"
|
||||||
done | yq -o json -I=0
|
yq eval "[{\"repo\": ._${role}_repo, \"role\": \"${role}\"}]" "${defaults_file}"
|
||||||
|
done | yq -o json -I=0
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "result=${result}"
|
||||||
|
|
6
.github/workflows/version_bumper.yml
vendored
6
.github/workflows/version_bumper.yml
vendored
|
@ -12,15 +12,15 @@ jobs:
|
||||||
discover-role-repos:
|
discover-role-repos:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
role-repos: ${{ steps.discovered-role-repos.outputs.result }}
|
role-repos: ${{ steps.discover.outputs.result }}
|
||||||
container:
|
container:
|
||||||
image: quay.io/prometheus/golang-builder:base
|
image: quay.io/prometheus/golang-builder:base
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get repos for each role
|
- name: Get repos for each role
|
||||||
id: discovered-role-repos
|
id: discover
|
||||||
run: ./.github/scripts/discover_role_repos.sh
|
run: ./.github/scripts/discover_role_repos.sh >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
check_for_new_versions:
|
check_for_new_versions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
Loading…
Reference in a new issue