Revision 0f821e4564b257e6f8abd0a6044f043a4d3609b3 authored by Roman Donchenko on 18 October 2023, 11:20:25 UTC, committed by GitHub on 18 October 2023, 11:20:25 UTC
This automates the second half of the release process (the first being
automated by `prepare-release.yml`). After this workflow completes, the
only action that should remain for the releaser to do is to merge the
`dev-release-*` pull request. We can't do that as part of this workflow,
because CI has to finish first, and it seems pointless to create another
workflow just to merge 1 PR.

Apply some of the aspects of this pipeline to `prepare-release.yml` as
well:

* Make the release notes extraction process more sophisticated to work
  around GitHub's frustrating handling of line breaks in PR and release
  descriptions.

* Use GitHub app credentials in order to be able to trigger other
  pipelines.
1 parent 871bd4f
Raw File
cleanup.yml
# Workflow deletes image artifacts that created by CI workflow
name: Delete image artifacts
on:
  workflow_run:
    workflows: [CI, Comment, Full]
    types:
      - completed

jobs:
  cleanup:
    runs-on: ubuntu-latest
    env:
      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - name: Clean up
        run: |
          wri=${{ github.event.workflow_run.id }}
          for ai in $(gh api /repos/${{ github.repository }}/actions/runs/$wri/artifacts | jq '.artifacts[] | select( .name | startswith("cvat"))  | .id');
          do
            gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$ai
          done
back to top