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

The set-output command is deprecated and will be disabled soon at github action 【docker.yml】 #432

Open
chendelin1982 opened this issue Dec 8, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@chendelin1982
Copy link
Contributor

What type of your feature request?

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/

  • docker.yml at websoft9
  • docker yml at docker-libaray
    - id: set-matrix
      run: |
        git diff --name-only HEAD^ HEAD
        changed_files=$(git diff --name-only HEAD^ HEAD)
        app_list=$(echo "$changed_files" | grep -E 'apps/.*/(Dockerfile|cmd.sh|entrypoint.sh)' | awk -F'/' '{print $2}' | sort | uniq)
        app_list_json=$(echo $app_list | jq -R -s -c 'split(" ")')
        echo "::set-output name=matrix::{\"app\": $app_list_json}"

use ENV to replace set-output:

echo "matrix={"app": $app_list_json}" >> $GITHUB_ENV

@chendelin1982 chendelin1982 added the enhancement New feature or request label Dec 8, 2023
@chendelin1982 chendelin1982 changed the title The set-output command is deprecated and will be disabled soon The set-output command is deprecated and will be disabled soon at github action 【docker.yml】 Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants