Skip to content

Commit

Permalink
Move ghcr cleanup to start
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Jul 11, 2024
1 parent 3c0d0ca commit d45ef20
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ outputs:
runs:
using: composite
steps:
# Cleanup if inputs.keep_versions provided
- name: GHCR Cleanup
if: ${{ inputs.keep_versions }}
uses: actions/[email protected]
with:
package-name: "${{ github.event.repository.name }}/${{ inputs.package }}"
package-type: "container"
min-versions-to-keep: ${{ inputs.keep_versions }}
ignore-versions: "${{ inputs.keep_regex }}"

# Process variables and inputs
- id: vars
shell: bash
Expand Down Expand Up @@ -160,16 +170,6 @@ runs:
cache-to: type=gha,mode=max
build-args: ${{ inputs.build_args }}

# Cleanup if inputs.keep_versions provided
- name: GHCR Cleanup
if: ${{ inputs.keep_versions }}
uses: actions/[email protected]
with:
package-name: "${{ github.event.repository.name }}/${{ inputs.package }}"
package-type: "container"
min-versions-to-keep: ${{ inputs.keep_versions }}
ignore-versions: "${{ inputs.keep_regex }}"

# Action repo needs to be present for cleanup/tests
- name: Checkout local repo to make sure action.yml is present
if: ${{ github.repository }} != ${{ inputs.repository }}
Expand Down

0 comments on commit d45ef20

Please sign in to comment.