mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-02 20:16:15 -04:00
ci: delete old images of all streams on ref main
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
3393e458e0
commit
2241e41fcf
1 changed files with 23 additions and 2 deletions
25
.github/workflows/purge-main.yml
vendored
25
.github/workflows/purge-main.yml
vendored
|
@ -3,7 +3,9 @@ name: Purge old images from main branch
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 */2 * * *"
|
- cron: "0 1/3 * * *"
|
||||||
|
- cron: "0 2/3 * * *"
|
||||||
|
- cron: "0 3/3 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
find-version:
|
find-version:
|
||||||
|
@ -26,13 +28,32 @@ jobs:
|
||||||
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead
|
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead
|
||||||
aws-region: eu-central-1
|
aws-region: eu-central-1
|
||||||
|
|
||||||
|
- name: Determine stream
|
||||||
|
id: stream
|
||||||
|
run: |
|
||||||
|
case "${{ github.event.schedule }}" in
|
||||||
|
"0 0/3 * * *")
|
||||||
|
echo "stream=debug" >> "$GITHUB_OUTPUT"
|
||||||
|
;;
|
||||||
|
"0 1/3 * * *")
|
||||||
|
echo "stream=console" >> "$GITHUB_OUTPUT"
|
||||||
|
;;
|
||||||
|
"0 2/3 * * *")
|
||||||
|
echo "stream=nightly" >> "$GITHUB_OUTPUT"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown schedule: ${{ github.event.schedule }}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
- name: List versions
|
- name: List versions
|
||||||
id: list
|
id: list
|
||||||
uses: ./.github/actions/versionsapi
|
uses: ./.github/actions/versionsapi
|
||||||
with:
|
with:
|
||||||
command: list
|
command: list
|
||||||
ref: main
|
ref: main
|
||||||
stream: debug
|
stream: ${{ steps.stream.outputs.stream }}
|
||||||
|
|
||||||
- name: Find version to delete
|
- name: Find version to delete
|
||||||
id: find
|
id: find
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue