Skip to content

Commit

Permalink
Get image size outside docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ptr727 committed Apr 29, 2024
1 parent ab6579d commit 78ca9d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/BuildDockerPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get image size
run: |
echo Image: docker.io/ptr727/plexcleaner:${{ matrix.tag }} > ${{ runner.temp }}/versions/${{ matrix.file }}
echo Size: $(docker manifest inspect -v docker.io/ptr727/plexcleaner:${{ matrix.tag }} | jq '.[] | select(.Descriptor.platform.architecture=="amd64") | .SchemaV2Manifest.layers[].size') >> ${{ runner.temp }}/versions/${{ matrix.file }}
# https://github.com/marketplace/actions/docker-run-action
- name: Write tool versions to file
uses: addnab/docker-run-action@v3
with:
image: docker.io/ptr727/plexcleaner:${{ matrix.tag }}
options: --volume ${{ runner.temp }}/versions:/versions
run: |
echo Image: docker.io/ptr727/plexcleaner:${{ matrix.tag }} > /versions/${{ matrix.file }}
echo Size: $(docker manifest inspect -v docker.io/ptr727/plexcleaner:${{ matrix.tag }} | jq '.[] | select(.Descriptor.platform.architecture=="amd64") | .SchemaV2Manifest.layers[].size') >> /versions/${{ matrix.file }}
echo OS: $(. /etc/os-release; echo $PRETTY_NAME) >> /versions/${{ matrix.file }}
echo dotNET: $(dotnet --info) >> /versions/${{ matrix.file }}
echo PlexCleaner: $(/PlexCleaner/PlexCleaner --version) >> /versions/${{ matrix.file }}
Expand Down

0 comments on commit 78ca9d6

Please sign in to comment.