File tree 2 files changed +46
-1
lines changed
2 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 27
27
name : Release
28
28
runs-on : ubuntu-latest
29
29
timeout-minutes : 30
30
+ outputs :
31
+ release-version : ${{ steps.package_release.outputs.version }}
30
32
steps :
31
- - uses : actions/checkout@v2.4.0
33
+ - uses : actions/checkout@v3.0.2
32
34
33
35
with :
34
36
dotnet-version : ' 6.0'
88
90
git add docs
89
91
git commit -m "Update GitHub pages" || true
90
92
git push https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git HEAD:gh-pages
93
+
94
+ docker :
95
+ name : docker
96
+ runs-on : ubuntu-latest
97
+ needs :
98
+ - release
99
+ env :
100
+ IMAGE_NAME : ${{ github.repository }}
101
+ IMAGE_VERSION : ${{ needs.release.outputs.release-version }}
102
+
103
+ timeout-minutes : 5
104
+ steps :
105
+
106
+
107
+ - name : Set up QEMU
108
+ uses : docker/setup-qemu-action@v2
109
+
110
+ - name : Login to DockerHub
111
+ uses : docker/login-action@v2
112
+ with :
113
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
114
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
115
+
116
+ - name : Build image and push
117
+ uses : docker/build-push-action@v3
118
+ with :
119
+ platforms : linux/amd64,linux/arm64
120
+ push : true
121
+ build-args :
122
+ VERSION=${{ env.IMAGE_VERSION }}
123
+ tags : |
124
+ cyclonedx/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
125
+ cyclonedx/${{ env.IMAGE_NAME }}:latest
Original file line number Diff line number Diff line change
1
+ # syntax=docker/dockerfile:1.4
2
+ FROM python:3-alpine
3
+ ARG VERSION
4
+
5
+ WORKDIR /wwwroot
6
+ ADD "https://github.com/CycloneDX/cyclonedx-web-tool/releases/download/v${VERSION}/CycloneDX.WebTool.${VERSION}.tar.gz" /tmp
7
+ RUN tar xvfz /tmp/CycloneDX.WebTool.${VERSION}.tar.gz
8
+
9
+ ENTRYPOINT [ "python3" , "-m" , "http.server" ]
10
+ CMD [ "8000" ]
You can’t perform that action at this time.
0 commit comments