Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Nov 11, 2024
1 parent 49b6cb3 commit e2659a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,26 +92,24 @@ jobs:
fi
# python3 workbench --config configs/create.yml
- name: Terminate Fabricator process
if: always()
run: |
kill $(cat fabricator_pid.txt)
- name: Get Job ID from GH API
id: get-job-id
if: always()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
jobs=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id}}/attempts/${{ github.run_attempt }}/jobs)
job_id=$(echo $jobs | jq -r '.jobs[] | select(.runner_name=="${{ runner.name }}") | .id')
echo "job_id=$job_id" >> $GITHUB_OUTPUT
- name: Notify Slack after job runs
if: always()
run: |-
curl -s -o /dev/null -XPOST $SLACK_WEBHOOK_URL -d '{
"text": ":islandora: :hammer_and_wrench: Workbench job complete ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.job_id }}#step:11:1",
}'
#curl -s -o /dev/null -XPOST $SLACK_WEBHOOK_URL -d '{
# "text": ":islandora: :hammer_and_wrench: Workbench job complete ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.job_id }}#step:11:1",
#}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

- name: Terminate Fabricator process
if: always()
run: |
kill $(cat fabricator_pid.txt)
2 changes: 1 addition & 1 deletion scripts/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ response=$(curl -s \
if echo "$response" | jq -e .values >/dev/null; then
max_columns=$(echo "$response" | jq -c '[.values[] | length] | max')

echo "$response" | jq -r --argjson max "$max_columns" '.values[] | (.+ (if length < $max then [null] * ($max - length) else [] end)) | @csv' > source.csv
echo "$response" | jq -r --argjson max "$max_columns" '.values[] | (map(tostring) + (if length < $max then ([null] * ($max - length)) else [] end)) | @csv' > source.csv

# and also as JSON in a format check my work expects
echo "$response" | jq -r '.values | (map(length) | max) as $max_columns | map(map(tostring) + ([""] * ($max_columns - length)))' > csv.json
Expand Down

0 comments on commit e2659a3

Please sign in to comment.