Skip to content

Commit

Permalink
Further adjust bash syntax; reduce workflow steps
Browse files Browse the repository at this point in the history
  • Loading branch information
bschilder committed Dec 10, 2023
1 parent 634ce1e commit 93b6e22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ jobs:
run_covr: ${{ true }}
run_pkgdown: ${{ true }}
has_runit: ${{ false }}
has_latex: ${{ true }}
# has_latex: ${{ true }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_docker: ${{ true }}
docker_user: bschilder
docker_org: neurogenomicslab
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
runner_os: ${{ runner.os }}
cache_version: cache-v1
free_diskspace: ${{ true }}
miniforge_variant: false
# free_diskspace: ${{ true }}
# miniforge_variant: false
17 changes: 8 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ runs:
- name: ℹ️ Get R package info
if: runner.os == 'Linux'
run: |
#### DockerHub repos must be lowercase (,,) ####
#### Docker repos must be lowercase (,,) ####
name=$(grep '^Package:' DESCRIPTION | cut -d\ -f2)
echo "packageName=${name,,}" >> $GITHUB_ENV
echo "packageNameOrig=${name}" >> $GITHUB_ENV
Expand All @@ -463,15 +463,14 @@ runs:
echo $version
echo "BASE_IMAGE=${{ matrix.config.cont }}" >> $GITHUB_ENV
#### Adjust docker args depending on docker_registry ####
if ${{ inputs.docker_registry }}=="docker.io";
then
echo "dockerOrg=${ inputs.docker_org,, }" >> $GITHUB_ENV
echo "dockerUser=${ inputs.docker_user }" >> $GITHUB_ENV
echo "dockerPass=${ inputs.DOCKER_TOKEN }" >> $GITHUB_ENV
if [[ "$inputs.docker_registry" != "docker.io" ]]; then
echo "dockerOrg=${inputs.docker_org,,}" >> $GITHUB_ENV
echo "dockerUser=${inputs.docker_user}" >> $GITHUB_ENV
echo "dockerPass=${inputs.DOCKER_TOKEN}" >> $GITHUB_ENV
else
echo "dockerOrg=${ github.repository_owner,, }" >> $GITHUB_ENV
echo "dockerUser=${ github.repository_owner }" >> $GITHUB_ENV
echo "dockerPass=${ inputs.GITHUB_TOKEN }" >> $GITHUB_ENV
echo "dockerOrg=${github.repository_owner,,}" >> $GITHUB_ENV
echo "dockerUser=${github.repository_owner}" >> $GITHUB_ENV
echo "dockerPass=${inputs.GITHUB_TOKEN}" >> $GITHUB_ENV
fi
shell: bash {0}

Expand Down

0 comments on commit 93b6e22

Please sign in to comment.