Skip to content

OPSEXP-2875: add search enterprise mediation & reindex + fix tests #57

OPSEXP-2875: add search enterprise mediation & reindex + fix tests

OPSEXP-2875: add search enterprise mediation & reindex + fix tests #57

Workflow file for this run

name: Cleanup Docker images on ghcr.io
on:
pull_request:
types: [closed]
schedule:
- cron: '0 0 */14 * *' # Every 2 weeks
workflow_dispatch:
inputs:
dry-run:
description: Dry run (do not delete images)
required: false
type: boolean
default: true
env:
ORG: Alfresco
REPO: alfresco-dockerfiles-bakery
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Get package names from bake definition
env:
JQ_FILTER: >-
.target
| map(select(.output | index("type=docker")))
| map(.tags[] | split("/")[-1] | split(":")[0])
| join(",")
run: |
echo PACKAGE_NAMES=$(docker buildx bake --print | jq -r '${{ env.JQ_FILTER }}') >> $GITHUB_ENV
- name: Remove tag ${{format('pr-{0}', github.event.pull_request.number)}} after PR is closed
uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066 # v1.0.13
if: github.event_name == 'pull_request'
with:
token: ${{ secrets.DELETE_PACKAGES_GITHUB_TOKEN }}
owner: ${{ env.ORG }}
repository: ${{ env.REPO }}
packages: ${{ env.PACKAGE_NAMES }}
delete-tags: ${{format('pr-{0}', github.event.pull_request.number)}}
dry-run: false
- name: Remove untagged images
uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066 # v1.0.13
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
token: ${{ secrets.DELETE_PACKAGES_GITHUB_TOKEN }}
owner: ${{ env.ORG }}
repository: ${{ env.REPO }}
packages: ${{ env.PACKAGE_NAMES }}
delete-untagged: true
dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run || (github.event_name != 'workflow_dispatch' && 'false') }}