with this code sample the action won't run due depreciation
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/
here is a fix for it if you don't mind to update the article,
thanks for the article.
- name: "Set flag from Commit"
id: step_one
env:
COMMIT_VAR: ${{ contains(github.event.head_commit.message, '[commit var]') }}
run: |
if ${COMMIT_VAR} == true; then
echo "action_state=true" >> $GITHUB_ENV
echo "flag set to true"
else
echo "action_state=false" >> $GITHUB_ENV
echo "flag set to false"
fi
- name: "Use flag if true"
if: env.action_state
run: echo "${{ env.action_state }}"
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
with this code sample the action won't run due depreciation
here is a fix for it if you don't mind to update the article,
thanks for the article.