mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
ci: hard code packages, gh token limitation [skip ci] (#773)
This commit is contained in:
32
.github/workflows/docker-cleanup.yaml
vendored
32
.github/workflows/docker-cleanup.yaml
vendored
@@ -14,32 +14,22 @@ concurrency:
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
enumerate:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||
outputs:
|
||||
packages: ${{ steps.list.outputs.packages }}
|
||||
steps:
|
||||
- id: list
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ORG: stoatchat
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
packages=$(gh api --paginate \
|
||||
"/orgs/${ORG}/packages?package_type=container" \
|
||||
--jq "[.[] | select(.repository.full_name == \"${REPO}\") | .name]")
|
||||
echo "packages=${packages}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
cleanup:
|
||||
needs: enumerate
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ needs.enumerate.outputs.packages != '[]' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: ${{ fromJSON(needs.enumerate.outputs.packages) }}
|
||||
package:
|
||||
- base
|
||||
- api
|
||||
- events
|
||||
- file-server
|
||||
- proxy
|
||||
- gifbox
|
||||
- crond
|
||||
- pushd
|
||||
- voice-ingress
|
||||
steps:
|
||||
- env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user