Skip to content

Commit

Permalink
bugfix: fix all if conditionals in actions.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed May 16, 2023
1 parent 10754a4 commit 476141e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/example-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
with:
python-version: '3.10'
- id: latch
uses: fulcrumgenomics/setup-latch@v1
uses: ./
- run: echo latch version ${{ steps.latch.outputs.latch-version }}
shell: bash
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ By default, this action will setup ssh config in `~/.ssh/config` for `latch` com

The action will optional add the provided latch workspace identifier and token to `~/.latch/workspace` and `~/.latch/token` files respectively.
This is used when registering your local workflow code to Latch (see the `register*` inputs).
See https://console.latch.bio/settings/developer.

Finally, the `latch` package is installed.

Expand Down
14 changes: 7 additions & 7 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ runs:
using: "composite"
steps:
- id: setup-ssh-config
if: ${{ inputs.ssh-config == 'true' }}
shell: bash
if: ${{ inputs.ssh-config }} == 'true'
run: |
mkdir -p ~/.ssh
echo 'Host *' >> ~/.ssh/config
echo ' StrictHostKeyChecking no' >> ~/.ssh/config
chmod 400 ~/.ssh/config
- id: setup-workspace
if: ${{ inputs.latch-workspace != "" }}
shell: bash
if: ${{ inputs.latch-workspace }} != ""
run: |
mkdir -p ~/.latch
echo -n "${{ inputs.latch-workspace }}" > ~/.latch/workspace
- id: setup-token
if: ${{ inputs.latch-token }} != ""
if: ${{ inputs.latch-token != "" }}
shell: bash
run: |
mkdir -p ~/.latch
Expand All @@ -82,15 +82,15 @@ runs:
run: |
echo "latch-version=$(latch --version | cut -f 3 -d ' ')" >> $GITHUB_OUTPUT
- id: latch-register
if: ${{ inputs.register == 'true' }}
shell: bash
if: ${{ inputs.register }} == 'true'
run: |
eval `ssh-agent -s`
args=${{ inputs.register-pkg-root }}
if [ ${{ inputs.register-remote }} == "true" ]; then
args="${{ inputs.register-pkg-root }}"
if [ "${{ inputs.register-remote }}" == "true" ]; then
args="--remote ${args}"
fi
if [ ${{ inputs.register-register-disable-auto-version }} == "true" ]; then
if [ "${{ inputs.register-register-disable-auto-version }}" == "true" ]; then
args="--register-disable-auto-version ${args}"
fi
latch register --yes ${args}
Expand Down

0 comments on commit 476141e

Please sign in to comment.