Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List repo artifact to assist in debugging failures #42

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
needs: unpublished
runs-on: ${{ matrix.os }}
# These permissions are needed to:
# - List artifacts
permissions:
actions: read
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
Expand All @@ -67,6 +71,16 @@ jobs:
with:
workflow: Update.yaml
name: ${{ needs.unpublished.outputs.key }}
# Assists in debugging cross workflow artifact issues
- name: List distinct artifacts
if: ${{ !cancelled() && steps.action-artifact.outcome == 'faliure' }}
run: |
# Show the earliest entry for each artifact
# https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28#list-artifacts-for-a-repository
gh api -X GET "/repos/{owner}/{repo}/actions/artifacts" | jq '.artifacts | sort_by(.created_at) | unique_by(.name)'
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
- name: Clear cached Overrides.toml
if: ${{ !needs.unpublished.outputs.key }}
run: rm -f ~/.julia/artifacts/Overrides.toml
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/Update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ jobs:
name: Artifacts
runs-on: ubuntu-latest
# These permissions are needed to:
# - List artifacts
# - Create PRs with `github.token`: https://github.com/marketplace/actions/create-pull-request#workflow-permissions
permissions:
actions: read
contents: write
pull-requests: write
env:
Expand Down Expand Up @@ -85,6 +87,15 @@ jobs:
commit-message: ${{ steps.build.outputs.commit_message }}
branch: gh/update-tzdata
token: ${{ secrets.TZJDATA_UPDATE_TOKEN || github.token }} # TODO: Fine-grained token expires
# Assists in debugging cross workflow artifact issues
- name: List distinct artifacts
run: |
# Show the earliest entry for each artifact
# https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28#list-artifacts-for-a-repository
gh api -X GET "/repos/{owner}/{repo}/actions/artifacts" | jq '.artifacts | sort_by(.created_at) | unique_by(.name)'
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}

# Work around having GitHub suspend the scheduled workflow if there is no commit activity
# for the past 60 days. As this repo doesn't get much activity beyond artifact updates
Expand Down
Loading