-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add purge_docker_slurm_images workflow
- Loading branch information
1 parent
ec26c7a
commit bf419fb
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |