Skip to content

feat: use Grafana 13.0.1 #738

feat: use Grafana 13.0.1

feat: use Grafana 13.0.1 #738

Workflow file for this run

name: Purge PR images
on:
workflow_call:
pull_request:
types:
- closed
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
permissions:
contents: read
packages: write
jobs:
check_paths:
uses: ./.github/workflows/check_paths.yml
check_if_pr_from_outside_repo:
needs: check_paths
if: needs.check_paths.outputs.githubfolder == 'false'
uses: ./.github/workflows/check_if_pr_from_outside_repo.yml
purge-pr-package:
name: Delete images from ghcr.io when PR is closed
needs:
- check_paths
- check_if_pr_from_outside_repo
if: needs.check_paths.outputs.githubfolder == 'false' && needs.check_if_pr_from_outside_repo.outputs.is_pr_from_outside_repo == 'false'
runs-on: ubuntu-24.04
concurrency:
group: "purge-pr-images"
steps:
- name: normalize version name to a valid string
# convert backslashes to dashes, so for example dependabot/x/y/z-1.2.3 works
id: normalize_version
shell: bash
run: |
VERSION="${{ github.head_ref }}"
NORMALIZED_VERSION="${VERSION//\//-}"
echo "normalized_version=${NORMALIZED_VERSION}" >> $GITHUB_OUTPUT
- uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
name: Delete images for teslamate and teslamate/grafana from ghcr.io
with:
packages: "teslamate,teslamate/grafana"
token: ${{ secrets.GITHUB_TOKEN }}
delete-tags: "pr-${{ github.event.pull_request.number }}"
- uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
name: Delete build cache images for teslamate from ghcr.io
with:
packages: "teslamate"
token: ${{ secrets.GITHUB_TOKEN }}
delete-tags: "buildcache-arm-${{ steps.normalize_version.outputs.normalized_version }},buildcache-arm64-${{ steps.normalize_version.outputs.normalized_version }},buildcache-amd64-${{ steps.normalize_version.outputs.normalized_version }}"
- uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
name: Delete untagged images from ghcr.io
with:
packages: "teslamate,teslamate/grafana"
token: ${{ secrets.GITHUB_TOKEN }}
delete-untagged: "true"
delete-ghost-images: "true"
older-than: "1 day"