-
Notifications
You must be signed in to change notification settings - Fork 173
83 lines (69 loc) · 2.01 KB
/
Copy pathe2e.yaml
File metadata and controls
83 lines (69 loc) · 2.01 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: e2e tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
SOURCE_DATE_EPOCH: 1669683910
permissions: {}
jobs:
rebuild:
name: rebuild
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
cfg:
# build and rebuild examples
- cargo-build.yaml
- gnu-hello.yaml
- go-build.yaml
- minimal.yaml
- npm-install.yaml
- pnpm-install.yaml
- melange.yaml # special; builds melange itself
container:
image: alpine:latest
options: |
--cap-add NET_ADMIN --cap-add SYS_ADMIN --security-opt seccomp=unconfined --security-opt apparmor:unconfined
steps:
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: "go.mod"
- name: Fetch dependencies
run: |
apk upgrade -Ua
apk add go cue-cli build-base git bubblewrap jq
- name: Build melange
run: |
make melange
./melange keygen
- name: Build package
env:
MATRIX_CFG: ${{ matrix.cfg }}
run: |
path=examples/$MATRIX_CFG
if [ "$MATRIX_CFG" == "melange.yaml" ]; then
path="melange.yaml"
fi
./melange build "$path" --arch=x86_64 --namespace=wolfi
- name: Rebuild package
run: |
./melange rebuild ./packages/x86_64/*.apk
- name: Upload APKs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
path: |
packages/**
rebuilt-packages/**
name: rebuild-${{matrix.cfg}}