martialonline / workflow-status Goto Github PK
View Code? Open in Web Editor NEWWorkflow Status Action
License: MIT License
Workflow Status Action
License: MIT License
A job is failing after the ownership of the repository was moved from one organization to another.
jq: error (at <stdin>:4): Cannot iterate over null (null)
Error: Process completed with exit code 5.
The relevant job that is failing:
report:
name: Report to Slack
needs: [
build_android,
build_ios,
quality
]
runs-on: ubuntu-latest
steps:
- uses: martialonline/workflow-status@v4
id: check
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
The Job was working totally fine before transferring ownership and is working fine in other repositories across different organizations. Is there potentially a necessary setting not correct in the new organisation or potentially some cached things trying to point to the old repository?
Any help would be appreciated
Run martialonline/workflow-status@v4
env:
APP_DIRECTORY: packages/app
Run url="${GITHUB_API_URL}/repos"
url="${GITHUB_API_URL}/repos"
repo="${GITHUB_REPOSITORY}"
run_id="${GITHUB_RUN_ID}"
token="***"
failure=$(curl -s -H "Authorization: token ${token}" "${url}/${repo}/actions/runs/${run_id}/jobs" | \
jq -r '.jobs[] | select(.status == "completed" and .conclusion == "failure").conclusion' | \
wc -l)
cancelled=$(curl -s -H "Authorization: token ${token}" "${url}/${repo}/actions/runs/${run_id}/jobs" | \
jq -r '.jobs[] | select(.status == "completed" and .conclusion == "cancelled").conclusion' | \
wc -l)
if [ "${failure}" -gt 0 ]; then
status="failure"
elif [ "${cancelled}" -gt 0 ]; then
status="cancelled"
else
status="success"
fi
echo "status=${status}" >> $GITHUB_OUTPUT
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
APP_DIRECTORY: packages/creator
jq: error (at <stdin>:[4](https://github.com/{user}/{repo}/actions/runs/{runId}/job/{jobId}#step:3:5)): Cannot iterate over null (null)
Error: Process completed with exit code [5](https://github.com/{user}/{repo}/actions/runs/{runId}/job/{jobId}#step:3:6).
It doesn't look like there are jobs found with the curl command and then an error occurs when jq tries to parse the jobs array.
Run url="${GITHUB_API_URL}/repos"
url="${GITHUB_API_URL}/repos"
repo="${GITHUB_REPOSITORY}"
run_id="${GITHUB_RUN_ID}"
failure=$(curl -s "${url}/${repo}/actions/runs/${run_id}/jobs" | \
jq -r '.jobs[] | select(.status == "completed" and .conclusion == "failure").conclusion' | \
wc -l)
cancelled=$(curl -s "${url}/${repo}/actions/runs/${run_id}/jobs" | \
jq -r '.jobs[] | select(.status == "completed" and .conclusion == "cancelled").conclusion' | \
wc -l)
if [ "${failure}" -gt 0 ]; then
status="failure"
elif [ "${cancelled}" -gt 0 ]; then
status="cancelled"
else
status="success"
fi
echo "::set-output name=status::${status}"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
jq: error (at <stdin>:4): Cannot iterate over null (null)
Error: Process completed with exit code 5.
GitHub action will run jobs in parallel without needs
why we just need to use the last job as dependency?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.