-
-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (53 loc) · 1.63 KB
/
docker-image.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Docker Image CI
on:
push:
branches: [ "main" ]
workflow_dispatch:
env:
IMAGE_REGISTRY: ghcr.io/vanilla-os
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rootfs
run: |
sudo apt install -y debootstrap podman
cd rootfs
sudo sh build.sh
cd ..
- name: Vib
run: |
wget https://github.com/Vanilla-OS/Vib/releases/download/v0.2.7/vib
chmod +x vib
./vib build recipe.yml
sed -i '/\/var\/tmp\/*/{d}' Containerfile
- name: Build the Docker image
run: podman image build -f Containerfile --tag vanillaos/pico:${{ github.ref_name }} .
# Push the image to Nexus (Image Registry)
# - name: Push To Registry
# uses: redhat-actions/[email protected]
# with:
# image: vanillaos/pico
# tags: ${{ github.ref_name }}
# registry: ${{ secrets.NEXUS_REGISTRY }}
# username: ${{ secrets.NEXUS_USER }}
# password: ${{ secrets.NEXUS_PSW }}
# tls-verify: false
# Push the image to GHCR (Image Registry)
- name: Push To GHCR
uses: redhat-actions/[email protected]
with:
registry: ${{ env.IMAGE_REGISTRY }}
image: pico
tags: ${{ github.ref_name }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--disable-content-trust
- uses: actions/upload-artifact@v3
with:
name: vanilla-pico-rootfs
path: rootfs/vanilla-pico.tar.zst