Skip to content

Cleanup container tags #48

Cleanup container tags

Cleanup container tags #48

name: Cleanup container tags
on: delete
jobs:
delete_container_tag:
name: Delete container tag
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package_name: ["tue-env-ros-noetic", "tue-env-ros-galactic", "tue-env-ros-humble"]
steps:
- name: Generate tag
id: generate-tag
run: |
TAG=$(echo "${{ github.event.ref }}" | tr '[:upper:]' '[:lower:]' | sed -e 's:/:_:g')
echo -e "\e[35m\e[tag=${TAG} >> \$GITHUB_OUTPUT\e[0m"
echo "tag=${TAG}" >> ${GITHUB_OUTPUT}
- name: Delete tags
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
organization: tue-robotics
container: ${{ matrix.package_name }}
prune-tags-regexes: |
^${{ steps.generate-tag.outputs.tag }}$
^${{ steps.generate-tag.outputs.tag }}-amd64$
^${{ steps.generate-tag.outputs.tag }}-arm64$