-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.16 KB
/
prune-mats-pr-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Cleanup MATS PR images
on:
pull_request:
types: [closed]
paths-ignore:
- "home/**"
jobs:
purge-images:
name: Cleanup PR images from ghcr.io
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
app:
- cb-metar
- ceil-vis
- ceil-vis15
- ensemble
- landuse
- precipAccum
- precipGauge
- precipitation1hr
- ptype
- radar
- scorecard
- surface
- surfrad
- upperair
steps:
- name: Get tag & appname
env:
APP: '${{ matrix.app }}'
run: |
echo "BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
echo "APP_LOWERCASE=${APP,,}" >> $GITHUB_ENV
- name: Cleanup images
if: ${{ (env.BRANCH != 'development') && (env.BRANCH != 'main') }} # don't prune images from the development or main branches
uses: bots-house/[email protected]
with:
owner: noaa-gsl
name: mats/development/${{ env.APP_LOWERCASE }}
token: ${{ secrets.GHCR_CLEANUP_PAT }}
tag: ${{ env.BRANCH }}