Skip to content

Commit

Permalink
slim image
Browse files Browse the repository at this point in the history
  • Loading branch information
cgcgcg committed Mar 1, 2024
1 parent 4f14280 commit d846a78
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
workflow_dispatch:


Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Container

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
workflow_dispatch:

env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/documentation-ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Documentation CI

on:
pull_request:
branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
workflow_dispatch:

permissions:
contents: read
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/slim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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

0 comments on commit d846a78

Please sign in to comment.