From 2684b9977a5b4201fa44c124af030aba78e498a8 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 18 Feb 2024 20:14:22 +0100 Subject: [PATCH] Reapply "export Images after puppet installation" This reverts commit d8bb773957d0ce58747c09566d8bcd55feab4335. --- .github/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4d86b9..1cee84c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: cache-version: ${{ inputs.cache-version }} working-directory: ${{ inputs.working-directory }} - name: Run beaker - run: bundle exec beaker --provision --preserve-hosts always --hosts ${{ matrix.env.BEAKER_SETFILE }}{tag=${{ github.repository }}} --log-level debug --helper install_puppet.rb + run: bundle exec beaker --provision --hosts ${{ matrix.env.BEAKER_SETFILE }} --log-level debug --helper install_puppet.rb env: ${{ matrix.env }} - name: List images run: docker images @@ -60,8 +60,10 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Add tag to image - run: docker image tag ${{ github.repository }}:latest ghcr.io/${{ github.repository_owner }}/${{ matrix.env.BEAKER_SETFILE }}-${{ matrix.env.BEAKER_PUPPET_COLLECTION }}:latest + - name: Export container name + run: docker container ls --last 1 --format json | jq --raw-output .Names > container_name + - name: commit Container + run: docker commit "$(cat container_name)" ghcr.io/${{ github.repository_owner }}/${{ matrix.env.BEAKER_SETFILE }}-${{ matrix.env.BEAKER_PUPPET_COLLECTION }}:latest - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5