diff --git a/.github/workflows/remove-old-images.yml b/.github/workflows/remove-old-images.yml new file mode 100644 index 00000000..3c9d2a03 --- /dev/null +++ b/.github/workflows/remove-old-images.yml @@ -0,0 +1,16 @@ +name: Remove Old Images +on: + schedule: + - cron: '10 02 * * 1' +jobs: + remove-old-images: + runs-on: ubuntu-latest + steps: + - name: Remove old images + uses: snok/container-retention-policy@v3.0.0 + with: + account: '${{ github.repository_owner }}' + cut-off: '8w' + image-names: 'fega-norway' + image-tags: '*-[0-9]* sha-* latest' + token: ${{ secrets.GITHUB_TOKEN }}