Azure / cli

Automate your GitHub workflows using Azure CLI scripts
MIT License
124 stars 52 forks source link

curl: command not found #127

Closed daniele-sarnari-blinkoo closed 6 months ago

daniele-sarnari-blinkoo commented 6 months ago

When i tried to use curl inside of azure/CLI@v1 step i got curl: command not found. In November the pipeline was fully working so something broke on github side or azure side.

I digged in until i discovered this:

name: Deploy to Azure Web App (Development)

on:
  push:
    branches:
      - "development"
  workflow_dispatch:

jobs:

  ...

  deploy:
    runs-on: ubuntu-latest
    needs: build

    steps:

      ...

      - name: Check curl installation
        run: |
          which curl
          curl --version

      - name: WebApp Deploy
        uses: azure/CLI@v1
        with:
          inlineScript: |
            /usr/bin/curl --version

/usr/bin/curl: No such file or directory image

How is that possible?

Thanks

daniele-sarnari-blinkoo commented 6 months ago

Installing curl dependency fixed, but on Novembre that was not necessary apk add curl

Did azure removed that from the docker image used by this action?

MoChilia commented 6 months ago

Hi @daniele-sarnari-blinkoo, Azure cli has removed package curl in docker image since 2.54.0 to reduce size, see https://github.com/Azure/azure-cli/pull/27567. If it is necessary for you to use curl in azure/cli action, please pin the azcliversion to 2.53.1. Or you may install it in inlinescript manually.

daniele-sarnari-blinkoo commented 6 months ago

Ok, many thanks @MoChilia