CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
92 lines
2.9 KiB
YAML
92 lines
2.9 KiB
YAML
name: Release Asset Audit
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
schedule:
|
|
# * is a special character in YAML so you have to quote this string
|
|
# Run once an hour
|
|
- cron: '5 * * * *'
|
|
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/release-asset-audit.py"
|
|
- ".github/workflows/release-asset-audit.yml"
|
|
|
|
permissions:
|
|
contents: read # Default everything to read-only
|
|
|
|
jobs:
|
|
audit:
|
|
name: "Release Asset Audit"
|
|
runs-on: ubuntu-24.04
|
|
if: github.repository == 'llvm/llvm-project'
|
|
steps:
|
|
- name: Checkout LLVM
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
sparse-checkout: |
|
|
.github/workflows/release-asset-audit.py
|
|
llvm/utils/git/requirements.txt
|
|
- name: "Run Audit Script"
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
run: |
|
|
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
|
|
python3 ./.github/workflows/release-asset-audit.py $GITHUB_TOKEN
|
|
|
|
- name: Upload comment file
|
|
if: failure()
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: comment
|
|
path: |
|
|
comment
|
|
|
|
notify-audit-failed:
|
|
name: "Notify Audit Failed"
|
|
environment:
|
|
name: main-branch-only
|
|
deployment: false
|
|
runs-on: ubuntu-24.04
|
|
if: >-
|
|
github.repository == 'llvm/llvm-project' &&
|
|
github.event_name != 'pull_request' &&
|
|
failure()
|
|
needs:
|
|
- audit
|
|
steps:
|
|
- name: Download Comment
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: comment
|
|
- id: app-token
|
|
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
|
|
with:
|
|
client-id: ${{ secrets.LLVM_TOKEN_GENERATOR_CLIENT_ID }}
|
|
private-key: ${{ secrets.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }}
|
|
owner: ${{ github.repository_owner }}
|
|
permission-contents: read
|
|
permission-issues: write
|
|
- name: "File Issue"
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ steps.app-token.outputs.token }}
|
|
script: |
|
|
var fs = require('fs');
|
|
var body = ''
|
|
if (fs.existsSync('./comment')) {
|
|
body = fs.readFileSync('./comment') + "\n\n";
|
|
}
|
|
body = body + `\n\nhttps://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`
|
|
|
|
const issue = await github.rest.issues.create({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
title: "Release Asset Audit Failed",
|
|
labels: ['infrastructure'],
|
|
body: body
|
|
});
|
|
console.log(issue);
|