The issue you're experiencing with the odoo job being skipped could be due to several reasons. Here are a few potential causes and solutions:
- Conditional Check Failure: The
odoojob has a conditional check:
if: ${{ needs.versions.outputs.names_comma != '' }}If the names_comma output from the versions job is an empty string, the odoo job will be skipped. Ensure that the versions job is producing the expected output.
-
Output Propagation: Ensure that the outputs from the
prev_git_tag_infoandversionsjobs are correctly propagated and used in theodoojob. Any issue in these jobs can cause theodoojob to be skipped. -
Job Dependencies: The
odoojob depends on theversionsjob:
needs: [versions]If the versions job fails or is skipped, the odoo job will not run. Check the logs of the versions job to ensure it completes successfully.
- Matrix Strategy: The
odoojob uses a matrix strategy:
strategy:
fail-fast: false
matrix:
version: "${{ fromJSON( needs.versions.outputs.names_json ) }}"Ensure that the names_json output from the versions job is a valid JSON array. Any issue in parsing this JSON can cause the job to be skipped.
-
GitHub Actions Cache: Sometimes, GitHub Actions cache can cause unexpected behavior. Try clearing the cache or using a different runner to see if the issue persists.
-
Re-run Behavior: Since re-running the workflow from the GitHub UI triggers the job correctly, it might be an intermittent issue or a race condition. Adding some debug steps to log the outputs and conditions can help identify the root cause.
Here is an example of how you can add debug steps to log the outputs and conditions:
odoo:
needs: [versions]
if: ${{ needs.versions.outputs.names_comma != '' }}
strategy:
fail-fast: false
matrix:
version: "${{ fromJSON( needs.versions.outputs.names_json ) }}"
steps:
- name: Debug - Log names_comma
run: echo "names_comma: ${{ needs.versions.outputs.names_comma }}"
- name: Debug - Log names_json
run: echo "names_json: ${{ needs.versions.outputs.names_json }}"
- name: Debug - Log condition
run: echo "Condition: ${{ needs.versions.outputs.names_comma != '' }}"
- name: Checkout monodoo
uses: actions/checkout@v4
# Add the rest of your steps hereBy adding these debug steps, you can check the logs to see the values of names_comma, names_json, and the condition result. This can help you identify if there is an issue with the outputs or the condition.