Skip to content

OPSEXP-2784 Add cleanup workflow for packages #13

OPSEXP-2784 Add cleanup workflow for packages

OPSEXP-2784 Add cleanup workflow for packages #13

Workflow file for this run

name: Cleanup Docker images on ghcr.io
on:
pull_request:
branches:
- main
permissions:
packages: write
env:
PACKAGE_NAMES: |
"alfresco-transform-router,
alfresco-shared-file-store,
alfresco-content-repository,
alfresco-imagemagick,
alfresco-misc,
alfresco-libreoffice,
alfresco-pdf-renderer,
alfresco-tika,
alfresco-elasticsearch-live-indexing-content,
alfresco-elasticsearch-live-indexing-path,
alfresco-elasticsearch-live-indexing-metadata,
alfresco-transform-core-aio,
alfresco-elasticsearch-live-indexing,
alfresco-share,
alfresco-ooi-service,
alfresco-ms-teams-service"
jobs:
cleanup-pr:
runs-on: ubuntu-latest
steps:
# - name: Set package names
# run: |
# echo "PACKAGE_NAMES=alfresco-transform-router,\
# alfresco-shared-file-store,\
# alfresco-content-repository,\
# alfresco-imagemagick,\
# alfresco-misc,\
# alfresco-libreoffice,\
# alfresco-pdf-renderer,\
# alfresco-tika,\
# alfresco-elasticsearch-live-indexing-content,\
# alfresco-elasticsearch-live-indexing-path,\
# alfresco-elasticsearch-live-indexing-metadata,\
# alfresco-transform-core-aio,\
# alfresco-elasticsearch-live-indexing,\
# alfresco-share,\
# alfresco-ooi-service,alfresco-ms-teams-service" >> $GITHUB_ENV
- name: Remove tag ${{format('pr-{0}', github.event.pull_request.number)}}
uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
owner: Alfresco
repository: alfresco-dockerfiles-bakery
packages: ${{ env.PACKAGE_NAMES }}
delete-tags: ${{format('pr-{0}', github.event.pull_request.number)}}
dry-run: true