티스토리 뷰

공부

[github] actions in status exit

승가비 2023. 8. 27. 16:12
728x90
jobs:
  build:
    runs-on: ubuntu-latest

    env:
      DIR: test
    
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      - run: ./sh/install.sh
        working-directory: ${{ env.DIR }}
      - id: app
        run: |
          python3 app.py
          status=$?
          echo "status=${status}" >> "$GITHUB_OUTPUT"
        working-directory: ${{ env.DIR }}
      - run: exit ${{ steps.app.outputs.status }}

https://stackoverflow.com/questions/69542929/is-there-a-way-to-log-error-responses-from-github-actions/76950494#76950494

 

Is there a way to log error responses from Github Actions?

I am trying to create a bug tracker that allows me to record the error messages of the python script I run. Here is my YAML file at the moment: name: Bug Tracker #Controls when the workflow will ...

stackoverflow.com

https://unix.stackexchange.com/questions/207957/assigning-exit-code-to-a-shell-local-variable

 

Assigning exit code to a shell local variable

#!/bin/bash function0() { local t1=$(exit 1) echo $t1 } function0 echo prints empty value. I expected: 1 Why doesn't t1 variable get assigned the exit command's return value - 1?

unix.stackexchange.com

 

728x90
댓글