Skip to content

Commit b019cf4

Browse files
committed
fix(codecov): flacky issue with pkgx setup
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent 15df291 commit b019cf4

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

actions/codecov/action.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,32 @@ runs:
4848
- name: Install missing Codecov dependencies
4949
if: steps.check-codecov-deps.outputs.missing-deps
5050
uses: pkgxdev/setup@f211ee4db3110b42e5a156282372527e7c1ed723 # v4.0.0
51-
with:
52-
+: ${{ steps.check-codecov-deps.outputs.missing-deps }}
51+
52+
- name: Install Codecov dependencies via pkgx
53+
if: steps.check-codecov-deps.outputs.missing-deps
54+
shell: bash
55+
env:
56+
MISSING_DEPS: ${{ steps.check-codecov-deps.outputs.missing-deps }}
57+
run: |
58+
set -euo pipefail
59+
60+
if [[ -z "${MISSING_DEPS}" ]]; then
61+
exit 0
62+
fi
63+
64+
if ! command -v pkgx &> /dev/null; then
65+
echo "pkgx is not installed. Exiting."
66+
exit 1
67+
fi
68+
69+
args=()
70+
for dep in ${MISSING_DEPS}; do
71+
args+=("+${dep}")
72+
done
73+
74+
pkgx "${args[@]}"
75+
76+
echo "Installed missing dependencies: ${MISSING_DEPS}"
5377
5478
- name: Fix unexpanded environment variables
5579
if: steps.check-codecov-deps.outputs.missing-deps

0 commit comments

Comments
 (0)