Skip to content

Commit

Permalink
fix(action): Port from set-output to env files
Browse files Browse the repository at this point in the history
GitHub deprecated the set-output command, and recommends using the new
environment files instead for security purposes.
  • Loading branch information
Kurt-von-Laven committed Oct 14, 2022
1 parent 0d8065f commit 8fd5fad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ jobs:
id: network
run: |
...
echo "::set-output name=outage::$OUTAGE"
echo "OUTAGE=$OUTAGE" >>"$GITHUB_OUTPUT"
shell: bash
- name: Send Slack notification with custom result.
if: always() && steps.network.outputs.outage == 'true'
if: always() && steps.network.outputs.OUTAGE == 'true'
uses: ScribeMD/slack-templates@0.6.11
with:
bot-token: ${{ secrets.SLACK_TEMPLATES_BOT_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ runs:
name: Read asdf Python version from .tool-versions.
run: |
python_version="$(grep --perl-regexp --only-matching '(?<=python )(\d+\.){2}\d+' .tool-versions)"
echo "::set-output name=version::$python_version"
echo "VERSION=$python_version" >>"$GITHUB_OUTPUT"
shell: bash
working-directory: "${{ github.action_path }}"
- name: Set up Python based on asdf Python version.
uses: actions/setup-python@v4.3.0
with:
python-version: "${{ steps.python.outputs.version }}"
python-version: "${{ steps.python.outputs.VERSION }}"
- name: Configure Slack notification.
run: >
python set_slack_message.py
Expand Down

0 comments on commit 8fd5fad

Please sign in to comment.