Skip to content

Commit a098ded

Browse files
committed
fix: uci.yml generation
1 parent f5435c4 commit a098ded

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/process.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ jobs:
106106
env:
107107
REPO: ${{ matrix.repository }}
108108
run: |
109-
workflows="$(ls "REPO/.github/workflows" || echo "" | jq -Rcs 'split("\n")[:-1]')"
109+
pushd "$REPO" > /dev/null
110+
workflows="$((ls .github/workflows/* || echo "") | jq -Rcs 'split("\n") | map(select(. != ""))')"
111+
popd > /dev/null
110112
eof="EOF$RANDOM"
111113
echo "json<<$eof" >> $GITHUB_OUTPUT
112114
jq --argjson workflows "$workflows" '. + { workflows: $workflows }' "$REPO.info" | tee -a $GITHUB_OUTPUT
@@ -121,7 +123,9 @@ jobs:
121123
name: Get ${{ github.repository }} GitHub info
122124
working-directory: ${{ github.repository }}
123125
run: |
124-
workflows="$(ls templates/.github/workflows | jq -Rcs 'split("\n")[:-1]')"
126+
pushd templates > /dev/null
127+
workflows="$(ls .github/workflows/* | jq -Rcs 'split("\n") | map(select(. != ""))')"
128+
popd > /dev/null
125129
eof="EOF$RANDOM"
126130
tag="$(git tag --points-at $(git describe --tags --abbrev=0 || true) | sort -V | tail -n-1)"
127131
echo "json<<$eof" >> $GITHUB_OUTPUT

templates/.github/uci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# For more information, see https://github.com/ipdxco/unified-github-workflows
44

55
# The Unified CI templates which should be distributed to your project.
6-
files: ${{{ .source.workflows - (.github.workflows - .source.workflows) }}}
6+
files: ${{{ .github.workflows - (.source.workflows - .github.workflows) }}}

0 commit comments

Comments
 (0)