Skip to content

Commit

Permalink
chore: add new step for output
Browse files Browse the repository at this point in the history
  • Loading branch information
dantetemplar committed Aug 12, 2024
1 parent 2bcbad2 commit f7fa663
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/listen-swagger-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
check:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.check.outputs.version }}
updated: ${{ steps.check.outputs.updated }}
version: ${{ steps.output.outputs.version }}
updated: ${{ steps.output.outputs.updated }}
steps:
- name: "Check out repository 🚚"
uses: actions/checkout@v4
Expand All @@ -25,16 +25,18 @@ jobs:
run: python -m pip install requests
- name: "Check for new Swagger release 🕵️‍♂️"
id: check
run: python check_swagger.py
# It will set SWAGGER_UI_UPDATED and SWAGGER_UI_VERSION env variables
# If there is a new release, then needed files will be updated
- name: "Make the output available to other jobs 📤"
id: output
run: |
python check_swagger.py
echo "updated=$SWAGGER_UI_UPDATED" >> "$GITHUB_OUTPUT"
echo "version=$SWAGGER_UI_VERSION" >> "$GITHUB_OUTPUT"
# It will set SWAGGER_UI_UPDATED and SWAGGER_UI_VERSION env variables
# If there is a new release, then needed files will be updated
- name: "Make a commit if needed 📝"
env:
updated: ${{ steps.check.outputs.updated }}
version: ${{ steps.check.outputs.version }}
updated: ${{ steps.output.outputs.updated }}
version: ${{ steps.output.outputs.version }}
run: |
echo "Updated: $updated"
echo "Version: $version"
Expand Down

0 comments on commit f7fa663

Please sign in to comment.