Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line 22: syntax error near unexpected token `fi' #59

Closed
tomicapretto opened this issue Jan 3, 2023 · 7 comments
Closed

Line 22: syntax error near unexpected token `fi' #59

tomicapretto opened this issue Jan 3, 2023 · 7 comments

Comments

@tomicapretto
Copy link

Hello!

I'm using setup@v2 and push@v2 actions in my repository https://github.com/estadisticaunr/estadistica-bayesiana. It used to work well, but recently I got a couple of failures with the following message

if [ Linux != "Windows" ]; then
    # On Windows scoop will be used so no need to download the release
    if [ -z "" ]; then
      # download the latest stable release
      gh release download --repo quarto-dev/quarto-cli --pattern *linux-amd64.deb
      version=$(curl https://quarto.org/docs/download/_download.json | jq -r '.version')
      echo "version=${version}" >> $GITHUB_OUTPUT
    elif [ "" == "LATEST" -o "" == "pre-release" ]; then
      # get latest pre release version 
      version=$(curl https://quarto.org/docs/download/_prerelease.json | jq -r '.version')
      wget https://github.com/quarto-dev/quarto-cli/releases/download/v$version/quarto-$version-linux-amd64.deb
      echo "version=${version}" >> $GITHUB_OUTPUT
    else
      # download a specific release
      wget https://github.com/quarto-dev/quarto-cli/releases/download/v/quarto--linux-amd64.deb
      echo "version=" >> $GITHUB_OUTPUT
    fi
    echo "installer=$(ls quarto*linux-amd64.deb)" >> $GITHUB_OUTPUT
  else
    # FIXME: how to get version information from scoop in windows runners?
    # send the cderv bat-signal!
  fi
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    R_LIBS_USER: /home/runner/work/_temp/Library
    TZ: UTC
    _R_CHECK_SYSTEM_CLOCK_: FALSE
    NOT_CRAN: true
    R_LIB_FOR_PAK: /opt/R/4.2.2/lib/R/site-library
    BUNDLE_EXT: linux-amd64.deb
    GITHUB_TOKEN: ***
/home/runner/work/_temp/a93c4f63-ea4e-4723-b14e-90932[37](https://github.com/estadisticaunr/estadistica-bayesiana/actions/runs/3830766211/jobs/6519056612#step:5:39)bc6c5.sh: line 22: syntax error near unexpected token `fi'
Error: Process completed with exit code 2.

This is the YAML file

on:
  push:
    branches: main

name: Renderizar y publicar página web

jobs:
  build-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v2 

      - name: Install R
        uses: r-lib/actions/setup-r@v2
        with:
          r-version: 'release'

      - name: Install dependencies
        uses: r-lib/actions/setup-r-dependencies@v2
        with:
          cache-version: 1
          packages: |
            any::here
            any::rmarkdown
            any::knitr
      - name: Set up Quarto
        uses: quarto-dev/quarto-actions/setup@v2    
        
      - name: Publish to GitHub Pages (and render)
        uses: quarto-dev/quarto-actions/publish@v2
        with:
          target: gh-pages

        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Is this a problem with the action? I'm not sure, since I don't see it has changed. But anyway, I think this is a good place to consult.

Thanks al lot!

@castorfou
Copy link

castorfou commented Jan 3, 2023

have the same issue. Worked 30min ago but fails right now.
I guess linked to version 2.1.

I call this action from my blog action uses: quarto-dev/quarto-actions/setup@v2

@DamonCharlesRoberts
Copy link

Having the same problem as well.

@cscheid
Copy link
Contributor

cscheid commented Jan 3, 2023

We see it. Fix incoming.

@cscheid cscheid closed this as completed in 15d0c45 Jan 3, 2023
@cscheid
Copy link
Contributor

cscheid commented Jan 3, 2023

Sorry folks! There was a dumb syntax error in the action. I believe I fixed it and v2 now points to the right place (v2.1.1) as well. Please reopen if this doesn't fix the problem for you.

@tomicapretto
Copy link
Author

Thanks a lot!

@castorfou
Copy link

Fixed on my side.
Thank you very much!

@DamonCharlesRoberts
Copy link

Fixed for me too. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants