Skip to content

Commit

Permalink
feat: add purge_docker_slurm_images workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmunday committed Dec 25, 2023
1 parent ec26c7a commit bf419fb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/purge_docker_slurm_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Purge SLURM docker images"

on:
pull_request:
paths:
- 'tests/integration/docker-slurm/Dockerfile*'
- 'tests/integration/docker-slurm/*.conf'
- 'tests/integration/docker-slurm/entrypoint.sh'
push:
paths:
- 'tests/integration/docker-slurm/Dockerfile*'
- 'tests/integration/docker-slurm/*.conf'
- 'tests/integration/docker-slurm/entrypoint.sh'
workflow_dispatch:

jobs:
generate_slurm_versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ join(fromJson(steps.set-versions.outputs.versions), '|') }}
steps:
- uses: actions/checkout@v3
- id: set-versions
name: set-versions
run: |
versions=$(cat ./supported_slurm_versions.json)
echo "versions=${versions}" >> $GITHUB_OUTPUT
purge_images:
needs: generate_slurm_versions
runs-on: ubuntu-latest
strategy:
matrix:
os: ["el7", "el8", "el9", "sl15", "ub20", "ub22"]
steps:
- name: "Purge old slurm-${{ matrix.os }} versions"
uses: actions/delete-package-versions@v4
with:
package-name: "slurm-mail/slurm-${{ matrix.os }}"
package-type: 'container'
min-versions-to-keep: 3
ignore-versions: '^(${{ needs.generate_slurm_versions.outputs.versions }})$'
token: ${{ secrets.PACKAGE_REPO }}

0 comments on commit bf419fb

Please sign in to comment.