-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (41 loc) · 1.14 KB
/
slim.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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