Skip to content

Commit

Permalink
Update test workflow to test outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
sondrelg committed Feb 1, 2022
1 parent a76ffb8 commit 3df49bf
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/clean_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,29 @@ jobs:
name: Then delete them
runs-on: ubuntu-latest
steps:
- name: Delete more than two weeks old
uses: sondrelg/container-retention-policy@v1
- name: Cache(d) image versions to skip
uses: actions/cache@v2
with:
path: skip-image-versions.txt
key: image-versions-to-skip

- name: Create file if it doesn't exist
run: touch skip-image-versions.txt
if: steps.cache-venv.outputs.cache-hit != 'true'

- name: Output file content
run: cat skip-image-versions.txt

- name: Delete images more than 2 seconds old
uses: sondrelg/container-retention-policy@main
with:
image-names: ghcr-retention-policy-test
cut-off: 2 seconds ago UTC+2
account-type: personal
token: ${{ secrets.PAT }}

- name: Write skipped tags to cache
run: echo "${{ steps.arbitrary-id.outputs.needs-github-assistance }}" > skip-image-versions.txt

- name: Output file content
run: cat skip-image-versions.txt

0 comments on commit 3df49bf

Please sign in to comment.