Skip to content

Simplify container

Simplify container #3

Workflow file for this run

name: Container slim
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
env:
IMAGE_NAME: pynucleus
IMAGE_TAGS: latest ${{ github.sha }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
jobs:
container:
runs-on: ubuntu-latest
timeout-minutes: 300
steps:
- name: Set environment variables for PR
run: |
echo "IMAGE_TAGS=pr" >> $GITHUB_ENV
- name: Pull image
run: |
docker pull ghcr.io/sandialabs/pynucleus:latest
- name: Slim the image
uses: kitabisa/docker-slim-action@v1
env:
DSLIM_HTTP_PROBE: false
with:
target: ghcr.io/sandialabs/pynucleus:latest
tag: "slim-latest"
# - name: Push To GHCR
# uses: redhat-actions/push-to-registry@v2
# with:
# image: pynucleus
# tags: slim-latest
# registry: ${{ env.IMAGE_REGISTRY }}
# username: ${{ env.REGISTRY_USER }}
# password: ${{ env.REGISTRY_PASSWORD }}
# extra-args: |
# --disable-content-trust