Skip to content

Commit

Permalink
fix: normalize variables
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif committed Sep 10, 2024
1 parent e5b303c commit 7523215
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-check-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,14 @@ jobs:
junit_xml_positive_threshold="${{ inputs.junit-xml-positive-threshold }}"
junit_xml_negative_threshold="${{ inputs.junit-xml-negative-threshold }}"
enable_sd="${{ inputs.enable-sd }}"
deps_installation_method="${{ inputs.deps-installation-method }}"
echo "junit_xml_storage=${junit_xml_storage_input:-_junit_xml_reports}" >> $GITHUB_ENV
echo "junit_xml_diff_branch=${junit_xml_diff_branch_input:-main}" >> $GITHUB_ENV
echo "junit_xml_comparison=${junit_xml_comparison_input:-true}" >> $GITHUB_ENV
echo "junit_xml_positive_threshold=${junit_xml_positive_threshold:-1.0}" >> $GITHUB_ENV
echo "junit_xml_negative_threshold=${junit_xml_negative_threshold:-1.0}" >> $GITHUB_ENV
echo "enable_sd=${enable_sd:-true}" >> $GITHUB_ENV
echo "deps_installation_method=${deps_installation_method:-staged-dependencies}" >> $GITHUB_ENV
shell: bash

- name: Restore npm cache 💰
Expand Down Expand Up @@ -375,7 +377,7 @@ jobs:
- name: Restore SD cache 💰
if: >-
inputs.install-deps-from-package-repositories == ''
&& inputs.deps-installation-method == 'staged-dependencies'
&& env.deps_installation_method == 'staged-dependencies'
uses: actions/cache@v4
with:
key: sd-${{ runner.os }}-${{ github.event.repository.name }}
Expand All @@ -392,7 +394,7 @@ jobs:
if: >-
env.enable_sd == 'true'
&& inputs.install-deps-from-package-repositories == ''
&& inputs.deps-installation-method == 'staged-dependencies'
&& env.deps_installation_method == 'staged-dependencies'
uses: insightsengineering/staged-dependencies-action@v2
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
Expand All @@ -404,7 +406,7 @@ jobs:

- name: Setup R dependencies 🎦
if: >-
inputs.deps-installation-method == 'setup-r-dependencies'
env.deps_installation_method == 'setup-r-dependencies'
&& inputs.install-deps-from-package-repositories == ''
uses: insightsengineering/setup-r-dependencies@fix_paths
with:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/roxygen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,23 @@ jobs:
env:
SKIP_INSTRUCTION: "[skip roxygen]"

- name: Normalize variables 📏
run: |
deps_installation_method="${{ inputs.deps-installation-method }}"
echo "deps_installation_method=${deps_installation_method:-staged-dependencies}" >> $GITHUB_ENV
shell: bash

- name: Restore SD cache 💰
if: >-
inputs.deps-installation-method == 'staged-dependencies'
env.deps_installation_method == 'staged-dependencies'
uses: actions/cache@v4
with:
key: sd-${{ runner.os }}-${{ github.event.repository.name }}
path: ~/.staged.dependencies

- name: Run Staged dependencies 🎦
if: >-
inputs.deps-installation-method == 'staged-dependencies'
env.deps_installation_method == 'staged-dependencies'
uses: insightsengineering/staged-dependencies-action@v2
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
Expand All @@ -144,7 +150,7 @@ jobs:

- name: Setup R dependencies 🎦
if: >-
inputs.deps-installation-method == 'setup-r-dependencies'
env.deps_installation_method == 'setup-r-dependencies'
uses: insightsengineering/setup-r-dependencies@fix_paths
with:
lookup-refs: ${{ inputs.lookup-refs }}
Expand Down

0 comments on commit 7523215

Please sign in to comment.