1515name : Publish to GHCR (+ Trivy scan)
1616on :
1717 workflow_dispatch :
18- branches : [dev]
1918 pull_request :
2019 push :
2120 branches :
2423 release :
2524 types : [published]
2625jobs :
26+ build_tech_overview :
27+ name : Build technical overview
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Check out the repo
31+ uses : actions/checkout@v4
32+ - name : Build tech overview PDF
33+ uses : docker://pandoc/latex:3.2
34+ with :
35+ entrypoint : /bin/sh
36+ args : >-
37+ -c "
38+ tlmgr update --self &&
39+ tlmgr install cm-super fontaxes lato pdflscape xkeyval &&
40+ updmap-sys &&
41+ pandoc
42+ --output=dds_web/static/dds-technical-overview.pdf
43+ doc/technical-overview.md
44+ "
45+ - name : Upload technical overview PDF
46+ uses : actions/upload-artifact@v4
47+ with :
48+ name : technical-overview-pdf
49+ path : dds_web/static/dds-technical-overview.pdf
50+ build_troubleshooting :
51+ name : Build troubleshooting guide
52+ runs-on : ubuntu-latest
53+ steps :
54+ - name : Check out the repo
55+ uses : actions/checkout@v4
56+ - name : Build troubleshooting guide
57+ uses : docker://pandoc/latex:3.2
58+ with :
59+ entrypoint : /bin/sh
60+ args : >-
61+ -c "
62+ tlmgr update --self &&
63+ tlmgr install cm-super fontaxes lato xkeyval &&
64+ updmap-sys &&
65+ pandoc
66+ --output=dds_web/static/dds-troubleshooting.pdf
67+ doc/troubleshooting.md
68+ "
69+ - name : Upload troubleshooting PDF
70+ uses : actions/upload-artifact@v4
71+ with :
72+ name : troubleshooting-pdf
73+ path : dds_web/static/dds-troubleshooting.pdf
2774 push_to_registry :
75+ needs : [build_tech_overview, build_troubleshooting]
2876 if : github.repository == 'ScilifelabDataCentre/dds_web'
2977 name : Push image
3078 runs-on : ubuntu-latest
@@ -37,23 +85,33 @@ jobs:
3785 cancel-in-progress : true
3886 steps :
3987 - name : Check out the repo
40- uses : actions/checkout@v3
88+ uses : actions/checkout@v4
4189 - name : Log in to Github Container Repository
42- uses : docker/login-action@v2
90+ uses : docker/login-action@v3
4391 with :
4492 registry : ghcr.io
4593 username : ${{ github.actor }}
4694 password : ${{ secrets.GITHUB_TOKEN }}
95+ - name : Download technical overview PDF
96+ uses : actions/download-artifact@v4
97+ with :
98+ name : technical-overview-pdf
99+ path : dds_web/static/dds-technical-overview.pdf
100+ - name : Download troubleshooting PDF
101+ uses : actions/download-artifact@v4
102+ with :
103+ name : troubleshooting-pdf
104+ path : dds_web/static/dds-troubleshooting.pdf
47105 - name : Docker metadata
48106 id : meta
49- uses : docker/metadata-action@v4
107+ uses : docker/metadata-action@v5
50108 with :
51109 images : |
52110 ghcr.io/scilifelabdatacentre/dds-backend
53111 - name : Ensure lowercase name
54112 run : echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
55113 - name : Build for scan
56- uses : docker/build-push-action@v3
114+ uses : docker/build-push-action@v4
57115 with :
58116 file : Dockerfiles/backend.Dockerfile
59117 context : .
67125 output : " trivy-results.sarif"
68126 severity : " CRITICAL,HIGH"
69127 - name : Upload Trivy scan results to Github Security tab
70- uses : github/codeql-action/upload-sarif@v2
128+ uses : github/codeql-action/upload-sarif@v3
71129 with :
72130 sarif_file : " trivy-results.sarif"
73131 category : trivy-build
0 commit comments