Cleanup container tags #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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$ |