Skip to content

Commit d846a78

Browse files
committed
slim image
1 parent 4f14280 commit d846a78

File tree

4 files changed

+60
-10
lines changed

4 files changed

+60
-10
lines changed

.github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [ "master" ]
6-
pull_request:
7-
branches: [ "master" ]
4+
# push:
5+
# branches: [ "master" ]
6+
# pull_request:
7+
# branches: [ "master" ]
88
workflow_dispatch:
99

1010

.github/workflows/container.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Container
22

33
on:
4-
push:
5-
branches: [ "master" ]
6-
pull_request:
7-
branches: [ "master" ]
4+
# push:
5+
# branches: [ "master" ]
6+
# pull_request:
7+
# branches: [ "master" ]
88
workflow_dispatch:
99

1010
env:

.github/workflows/documentation-ci.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Documentation CI
22

33
on:
4-
pull_request:
5-
branches: [ "master" ]
4+
# pull_request:
5+
# branches: [ "master" ]
6+
workflow_dispatch:
67

78
permissions:
89
contents: read

.github/workflows/slim.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Container slim
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
workflow_dispatch:
9+
10+
env:
11+
IMAGE_NAME: pynucleus
12+
IMAGE_TAGS: latest ${{ github.sha }}
13+
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
14+
REGISTRY_USER: ${{ github.actor }}
15+
REGISTRY_PASSWORD: ${{ github.token }}
16+
17+
jobs:
18+
19+
container:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 300
22+
23+
steps:
24+
- name: Set environment variables for PR
25+
run: |
26+
echo "IMAGE_TAGS=pr" >> $GITHUB_ENV
27+
28+
- name: Pull image
29+
run: |
30+
docker pull ghcr.io/sandialabs/pynucleus:latest
31+
32+
- name: Slim the image
33+
uses: kitabisa/docker-slim-action@v1
34+
env:
35+
DSLIM_HTTP_PROBE: false
36+
with:
37+
target: ghcr.io/sandialabs/pynucleus:latest
38+
tag: "slim-latest"
39+
40+
# - name: Push To GHCR
41+
# uses: redhat-actions/push-to-registry@v2
42+
# with:
43+
# image: pynucleus
44+
# tags: slim-latest
45+
# registry: ${{ env.IMAGE_REGISTRY }}
46+
# username: ${{ env.REGISTRY_USER }}
47+
# password: ${{ env.REGISTRY_PASSWORD }}
48+
# extra-args: |
49+
# --disable-content-trust

0 commit comments

Comments
 (0)