File tree 4 files changed +57
-10
lines changed
4 files changed +57
-10
lines changed Original file line number Diff line number Diff line change
1
+ name : Main
2
+ on : [push, pull_request]
3
+ jobs :
4
+ test-main :
5
+ runs-on : ubuntu-latest
6
+ steps :
7
+ - uses : actions/checkout@v1
8
+ - run : docker build -t slirp4netns-tests -f Dockerfile.tests .
9
+ - run : docker run --rm --privileged slirp4netns-tests
10
+ test-build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v1
14
+ - run : DOCKER_BUILDKIT=1 docker build -f Dockerfile.buildtests .
15
+ artifact :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v1
19
+ - run : DOCKER_BUILDKIT=1 docker build -o /tmp/artifact --target artifact -f Dockerfile.buildtests .
20
+ - run : (cd /tmp/artifact; sha256sum *)
21
+ - uses : actions/upload-artifact@v1
22
+ with :
23
+ name : slirp4netns-x86_64
24
+ path : /tmp/artifact/slirp4netns
Original file line number Diff line number Diff line change
1
+ name : Release
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' v*'
6
+
7
+ jobs :
8
+ release :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v1
12
+ - run : DOCKER_BUILDKIT=1 docker build -o /tmp/artifact --target artifact -f Dockerfile.buildtests .
13
+ - run : (cd /tmp/artifact; sha256sum *)
14
+ - uses : actions/create-release@v1
15
+ id : create_release
16
+ env :
17
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
18
+ with :
19
+ tag_name : ${{ github.ref }}
20
+ release_name : ${{ github.ref }}
21
+ draft : true
22
+ - uses : actions/upload-release-asset@v1
23
+ env :
24
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25
+ with :
26
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
27
+ asset_path : /tmp/artifact/slirp4netns
28
+ asset_name : slirp4netns-x86_64
29
+ asset_content_type : application/octet-stream
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ RUN ./autogen.sh
44
44
FROM buildtest-opensuse151-common AS buildtest-opensuse151-dynamic
45
45
RUN ./configure && make && cp -f slirp4netns /
46
46
47
+ # artifact for GitHub actions
48
+ FROM scratch AS artifact
49
+ COPY --from=buildtest-alpine310-static /slirp4netns /slirp4netns
50
+
47
51
FROM scratch AS buildtest-final-stage
48
52
COPY --from=buildtest-alpine310-static /slirp4netns /buildtest-alpine310-static
49
53
COPY --from=buildtest-ubuntu1804-dynamic /slirp4netns /buildtest-ubuntu1804-dynamic
You can’t perform that action at this time.
0 commit comments