-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (44 loc) · 1.51 KB
/
trident.yaml
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
name: Trident Build
on:
push:
paths:
- "trident-distrowith/**"
pull_request:
paths:
- "trident-distrowith/**"
jobs:
build:
# github.ref == 'refs/heads/main' &&
if: |
!github.event.pull_request.head.repo.fork
runs-on: ubuntu-latest
defaults:
run:
working-directory: trident-distrowith
steps:
- uses: actions/checkout@v4
- name: Checkout trident repo
run: ./checkout.sh
- name: Patch Dockerfile with alpine and nfs-utils
working-directory: trident-distrowith/trident
run: patch Dockerfile ../dockerfile.patch
- name: Patch chwrap.go to stop searching binaries in /host
working-directory: trident-distrowith/trident
run: patch chwrap/chwrap.go ../chwrap.patch
- name: Patch Makefile to change default registry for images
working-directory: trident-distrowith/trident
run: patch Makefile ../makefile.patch
- name: Run make command
working-directory: trident-distrowith/trident
env:
BUILD_TYPE: stable
run: make images
- name: List docker images
run: docker image ls
- name: Log in to ghcr.io registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Push docker images
run: |
docker image ls --format=json | \
jq 'select(.Repository == "ghcr.io/postfinance/trident") | .Repository + ":" + .Tag' | \
xargs -I_ docker push _