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

Remove deprecated GitHub Action set-output command #25

Open
epapineau opened this issue Jun 14, 2023 · 3 comments · May be fixed by #26
Open

Remove deprecated GitHub Action set-output command #25

epapineau opened this issue Jun 14, 2023 · 3 comments · May be fixed by #26

Comments

@epapineau
Copy link

epapineau commented Jun 14, 2023

set-output has been deprecated leading to the following message when using this code snippet:

Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
@epapineau epapineau linked a pull request Jun 14, 2023 that will close this issue
@aballiet
Copy link

Any update ?

@jerome-laurent-pro
Copy link

jerome-laurent-pro commented Mar 4, 2024

set-output has been deprecated leading to the following message:

Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

@epapineau, I think this isn't enough because the trilom/[email protected] GH action also uses set-output. I replaced it by Ana06/[email protected] that is up to date, and it works. Do you want me to update your PR?

@aballiet if you want to update your own workflow before the PR is accepted, you can replace the get_file_changes and get_files_to_lint steps by something like this will and it should work:

      - name: Get changed files
        id: get_file_changes
        uses: Ana06/[email protected]
        with:
          format: 'space-delimited'
          filter: '*'

      - name: Get new and changed .sql files in /models to lint
        id: get_files_to_lint
        shell: bash -l {0}
        run: |
          # Set the command in the $() brackets as an output to use in later steps
          echo "lintees=$(
          # Issue where grep regular expressions don't work as expected on the
          # Github Actions shell, check dbt/models/ folder
          echo \
          $(echo ${{ steps.get_file_changes.outputs.modified }} |
          tr -s ' ' '\n' |
          grep -E '^models.*[.]sql$' |
          tr -s '\n' ' ') \
          $(echo ${{ steps.get_file_changes.outputs.added }} |
          tr -s ' ' '\n' |
          grep -E '^models.*[.]sql$' |
          tr -s '\n' ' ')
          )" >> $GITHUB_OUTPUT

@epapineau
Copy link
Author

@jerome-laurent-pro I haven't seen any comment / feedback on the PR, feel free to do as you wish with it~✨

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

Successfully merging a pull request may close this issue.

3 participants