percy / exec-action

A (deprecated) GitHub action to run Percy Agent `percy exec` commands
https://docs.percy.io/docs/github-actions#section-exec-action
MIT License
8 stars 5 forks source link

Error: Unable to process command '::set-env name=PERCY_GITHUB_ACTION,::exec/0.1.1' successfully #23

Closed Norfeldt closed 3 years ago

Norfeldt commented 3 years ago

I'm trying to setup

I have added a github secret named PERCY_TOKEN and pushed the following github action workflow:

name: Percy (Visual Regression Testing)
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@master
      - name: Install
        run: yarn
      - name: Set environment variable(s)
        run: |
          echo "PERCY_TOKEN=${{ secrets.PERCY_TOKEN }}" >> $GITHUB_ENV
      - name: Percy Test
        uses: percy/exec-action@v0.1.1
        with:
          command: 'cypress run'

but it keeps failing with

Error: Unable to process command '::set-env name=PERCY_GITHUB_ACTION,::exec/0.1.1' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Error: Unable to process command '::set-env name=PERCY_BRANCH,::implement-css' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Error: Unable to process command '::set-env name=PERCY_PULL_REQUEST,::30' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

I'm setting the env according the the guidelines:

https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files

wwilsman commented 3 years ago

Hi @Norfeldt! Looks like you're using an older version of the action (v0.1.1) that previously used the set-env command which has been disabled. This was addressed with #20 and fixed in v0.3.1, so updating the action version should prevent that error from happening.

Norfeldt commented 3 years ago

thanks a lot @wwilsman #25