Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Fix/cleanup images #354

Merged
merged 6 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 78 additions & 8 deletions .github/workflows/clean-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,90 @@ on:
pull_request:
types: [closed]

env:
REGISTRY: ghcr.io
GPSIMAGE_NAME: ${{ github.repository }}/gps

jobs:
build:
runs-on: self-hosted
runs-on: ubuntu-latest

steps:
- name: Delete ephemereal GPS images from registry
- name: Try delete kuksa.val databroker PR container from GHCR
uses: bots-house/[email protected]
continue-on-error: true
with:
owner: eclipse
name: kuksa.val.feeders/gps
token: ${{ secrets.PUSH_CONTAINER_TOKEN }}
name: kuksa.val/databroker
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-${{github.event.pull_request.number}}



- name: Try delete kuksa.val server PR container from GHCR
uses: bots-house/[email protected]
continue-on-error: true
with:
owner: eclipse
name: kuksa.val/kuksa-val
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-${{github.event.pull_request.number}}


- name: Try delete kuksa.val client PR container from GHCR
uses: bots-house/[email protected]
continue-on-error: true
with:
owner: eclipse
name: kuksa.val/kuksa-client
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-${{github.event.pull_request.number}}

##One time cleanup from previous failures :)
- name: Try delete kvs 347
uses: bots-house/[email protected]
continue-on-error: true
with:
owner: eclipse
name: kuksa.val/kuksa-val
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-347

- name: Try delete db 344
uses: bots-house/[email protected]
continue-on-error: true
with:
owner: eclipse
name: kuksa.val/databroker
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-344

- name: Try delete kvs 283
uses: bots-house/[email protected]
continue-on-error: true
with:
owner: eclipse
name: kuksa.val/kuksa-val
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-283

- name: Try delete kvs 344
uses: bots-house/[email protected]
continue-on-error: true
with:
owner: eclipse
name: kuksa.val/kuksa-val
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-344

- name: Try delete kvs 245
uses: bots-house/[email protected]
continue-on-error: true
with:
owner: eclipse
name: kuksa.val/kuksa-val
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-345




- name: Finish
run: echo "Any temp images in GHCR shall be gone"

6 changes: 4 additions & 2 deletions .github/workflows/kuksa_val_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

#push to ghcr if we have rights, AND thisis not a PR (current settings in Eclipse orga do not
#seem to allow us to ever delete pushed images, so try not to push PR images
- name: Build kuksa.val server container and push to ghcr.io
if: needs.checkrights.outputs.have_secrets == 'true'
if: ${{ needs.checkrights.outputs.have_secrets == 'true' && github.event_name != 'pull_request' }}
uses: docker/build-push-action@v3
with:
platforms: |
Expand All @@ -65,7 +67,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

- name: Build ephemereal kuksa-val docker and push to ttl.sh
if: needs.checkrights.outputs.have_secrets == 'false'
if: ${{ needs.checkrights.outputs.have_secrets == 'false' || github.event_name == 'pull_request' }}
uses: docker/build-push-action@v3
with:
platforms: |
Expand Down