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

Commit

Permalink
Tag and push series too
Browse files Browse the repository at this point in the history
If we decide to push some image, also push a series image.

NOTE: because this is guarded behind the image not already existing, we
will only create these as natural releases of new versions occur. We may
or may not backfill manually out of band.
  • Loading branch information
pbrisbin committed Jul 19, 2023
1 parent e98c642 commit 947ec81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion restylers/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import RIO.Directory (doesFileExist)
import RIO.FilePath (takeExtension, (<.>), (</>))
import Restylers.App
import Restylers.Build
import Restylers.Image (getSeriesImages)
import qualified Restylers.Info.Resolved as Info
import Restylers.Manifest (toRestyler)
import qualified Restylers.Manifest as Manifest
Expand Down Expand Up @@ -37,7 +38,14 @@ main = do
exists <- doesRestylerImageExist $ Manifest.image restyler
if exists
then logWarn "Not pushing, image exists"
else pushRestylerImage $ Manifest.image restyler
else do
pushRestylerImage $ Manifest.image restyler

for_ (getSeriesImages $ Manifest.image restyler) $ \images -> do
for_ images $ \image -> do
logInfo $ "Updating series image " <> display image
dockerTag (Manifest.image restyler) image
pushRestylerImage image

traverse_ (liftIO . (`Manifest.write` restylers)) oWrite

Expand Down
1 change: 1 addition & 0 deletions restylers/src/Restylers/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Restylers.Build
, doesRestylerImageExist
, pushRestylerImage
, dockerRunSh
, dockerTag
) where

import RIO hiding (to)
Expand Down

0 comments on commit 947ec81

Please sign in to comment.