Skip to content

Commit

Permalink
fix: use trap command to ensure that the ./stop script is called on e…
Browse files Browse the repository at this point in the history
…xit of the step name Generation: generate ${{ matrix.app }} from main branch
  • Loading branch information
renanfranca committed Nov 12, 2024
1 parent 4e26ffd commit b3517b5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,15 @@ jobs:
- name: 'Generation: generate ${{ matrix.app }} from main branch'
if: github.event_name == 'pull_request'
working-directory: ./main-branch/tests-ci/
continue-on-error: true # Allow the step to continue even if generate.sh fails
continue-on-error: true
id: generate-main
run: |
# Set up trap to ensure stop.sh is called on exit
trap './stop.sh' EXIT
./start.sh 7471
(./generate.sh ${{ matrix.app }} ${{ matrix.java-build-tool }} ${{ matrix.spring-config-format }}; GENERATE_EXIT_CODE=$?)
./stop.sh
./generate.sh ${{ matrix.app }} ${{ matrix.java-build-tool }} ${{ matrix.spring-config-format }}
GENERATE_EXIT_CODE=$?
echo "exit_code=$GENERATE_EXIT_CODE" >> $GITHUB_OUTPUT
exit $GENERATE_EXIT_CODE
- name: 'Generation: calculate md5sum ${{ matrix.app }} from main branch'
Expand Down

0 comments on commit b3517b5

Please sign in to comment.