skip_changelog: Fix workflow outputs syntax

Use the correct syntax for getting the output from a workflow job.

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2023-05-01 13:07:31 +02:00 committed by SuperQ
parent f6e6ac041e
commit 336c4d6775
No known key found for this signature in database
GPG key ID: C646B23C9E3245F1
2 changed files with 13 additions and 7 deletions

View file

@ -1,6 +1,12 @@
#!/usr/bin/env bash
#
# Description: Discover the upstream repo from each role default vars.
for defaults_file in roles/*/vars/main.yml ; do
role="$(echo "${defaults_file}" | cut -f2 -d'/')"
yq eval "[{\"repo\": ._${role}_repo, \"role\": \"${role}\"}]" "${defaults_file}"
done | yq -o json -I=0
result=$(
for defaults_file in roles/*/vars/main.yml ; do
role="$(echo "${defaults_file}" | cut -f2 -d'/')"
yq eval "[{\"repo\": ._${role}_repo, \"role\": \"${role}\"}]" "${defaults_file}"
done | yq -o json -I=0
)
echo "result=${result}"

View file

@ -12,15 +12,15 @@ jobs:
discover-role-repos:
runs-on: ubuntu-latest
outputs:
role-repos: ${{ steps.discovered-role-repos.outputs.result }}
role-repos: ${{ steps.discover.outputs.result }}
container:
image: quay.io/prometheus/golang-builder:base
steps:
- uses: actions/checkout@v3
- name: Get repos for each role
id: discovered-role-repos
run: ./.github/scripts/discover_role_repos.sh
id: discover
run: ./.github/scripts/discover_role_repos.sh >> "$GITHUB_OUTPUT"
check_for_new_versions:
runs-on: ubuntu-latest