diff --git a/.github/actions/check_cirrus_cron/cron_failures.sh b/.github/actions/check_cirrus_cron/cron_failures.sh index 0e669c19c1..1ed216f5fd 100755 --- a/.github/actions/check_cirrus_cron/cron_failures.sh +++ b/.github/actions/check_cirrus_cron/cron_failures.sh @@ -32,14 +32,11 @@ EOF # https://cirrus-ci.com/explorer owner=$(cut -d '/' -f 1 <<<"$GITHUB_REPOSITORY") repo=$(cut -d '/' -f 2 <<<"$GITHUB_REPOSITORY") -sed -i -r -e "s/@@OWNER@@/$owner/g" -e "s/@@REPO@@/$repo/g" ./artifacts/query_raw.json - -# Easier to debug in error-reply when query is compacted -tr -d '\n' < ./artifacts/query_raw.json | tr -s ' ' | tee ./artifacts/query.json | \ - jq --indent 4 --color-output . +sed -r -e "s/@@OWNER@@/$owner/g" -e "s/@@REPO@@/$repo/g" \ + ./artifacts/query_raw.json > ./artifacts/query.json if grep -q '@@' ./artifacts/query.json; then - err "Found unreplaced substitution token in raw query JSON" + err "Found unreplaced substitution token in query JSON" fi # The query should never ever return an empty-list, unless there are no cirrus-cron @@ -47,7 +44,7 @@ fi # be running anyway. filt_head='.data.ownerRepository.cronSettings' -gql $(./artifacts/query.json) "$filt_head" > ./artifacts/reply.json +gql "$(<./artifacts/query.json)" "$filt_head" > ./artifacts/reply.json # e.x. reply.json # { # "data": { diff --git a/.github/workflows/check_cirrus_cron.yml b/.github/workflows/check_cirrus_cron.yml index 1162ba2e76..c38574e366 100644 --- a/.github/workflows/check_cirrus_cron.yml +++ b/.github/workflows/check_cirrus_cron.yml @@ -32,7 +32,7 @@ jobs: cron_failures: runs-on: ubuntu-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@v3 with: persist-credentials: false @@ -47,7 +47,7 @@ jobs: - if: steps.cron.outputs.failures > 0 name: Send failure notification e-mail # Ref: https://github.com/dawidd6/action-send-mail - uses: dawidd6/action-send-mail@a80d851dc950256421f1d1d735a2dc1ef314ac8f # v2.2.2 + uses: dawidd6/action-send-mail@v3.7.1 with: server_address: ${{secrets.ACTION_MAIL_SERVER}} server_port: 465 @@ -59,14 +59,14 @@ jobs: body: file://./artifacts/email_body.txt - if: always() - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1 + uses: actions/upload-artifact@v3 with: name: ${{ github.job }}_artifacts path: artifacts/* - if: failure() name: Send error notification e-mail - uses: dawidd6/action-send-mail@a80d851dc950256421f1d1d735a2dc1ef314ac8f # v2.2.2 + uses: dawidd6/action-send-mail@3.7.1 with: server_address: ${{secrets.ACTION_MAIL_SERVER}} server_port: 465 diff --git a/.github/workflows/rerun_cirrus_cron.yml b/.github/workflows/rerun_cirrus_cron.yml index 7fd01b071d..55546ddc9a 100644 --- a/.github/workflows/rerun_cirrus_cron.yml +++ b/.github/workflows/rerun_cirrus_cron.yml @@ -14,6 +14,7 @@ on: # Debug: Allow triggering job manually in github-actions WebUI workflow_dispatch: {} + env: # Debug-mode can reveal secrets, only enable by a secret value. # Ref: https://help.github.com/en/actions/configuring-and-managing-workflows/managing-a-workflow-run#enabling-step-debug-logging @@ -28,7 +29,7 @@ permissions: contents: read jobs: - cron_failures: + cron_rerun: runs-on: ubuntu-latest steps: - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2