@@ -20,7 +20,119 @@ jobs:
2020 - run-tests
2121 - run-integration-tests
2222
23- release :
24- uses : ./.github/workflows/release.yml
25- secrets : inherit
26- needs : run-build
23+ publish-to-pypi :
24+ name : >-
25+ Publish Python 🐍 distribution 📦 to PyPI
26+ if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
27+ runs-on : ubuntu-latest
28+ environment :
29+ name : pypi
30+ url : https://pypi.org/p/sunbeamlib
31+ permissions :
32+ id-token : write # IMPORTANT: mandatory for trusted publishing
33+ needs : run-build
34+
35+ steps :
36+ - name : Download all the dists
37+ uses : actions/download-artifact@v4
38+ with :
39+ name : python-package-distributions
40+ path : dist/
41+ - name : Publish distribution 📦 to PyPI
42+ uses : pypa/gh-action-pypi-publish@release/v1
43+
44+ publish-to-dockerhub :
45+ name : >-
46+ Publish Docker 🐳 image 📦 to Docker Hub
47+ if : startsWith(github.ref, 'refs/tags/') # only publish to Docker Hub on tag pushes
48+ runs-on : ubuntu-latest
49+ needs : run-build
50+
51+ steps :
52+ - uses : actions/checkout@v4
53+
54+ - name : Log in to Docker Hub
55+ uses : docker/login-action@v3
56+ with :
57+ username : ${{ secrets.DOCKERHUB_USERNAME }}
58+ password : ${{ secrets.DOCKERHUB_TOKEN }}
59+
60+ - name : Extract Docker metadata
61+ id : meta
62+ uses : docker/metadata-action@v5
63+ with :
64+ images : sunbeamlabs/sunbeam
65+
66+ - name : Build and push full image
67+ uses : docker/build-push-action@v6
68+ with :
69+ context : .
70+ file : ./Dockerfile
71+ push : true
72+ tags : |
73+ sunbeamlabs/sunbeam:latest
74+ sunbeamlabs/sunbeam:${{ github.ref_name }}
75+ labels : ${{ steps.meta.outputs.labels }}
76+
77+ - name : Build and push slim image
78+ uses : docker/build-push-action@v6
79+ with :
80+ context : .
81+ file : ./slim.Dockerfile
82+ push : true
83+ tags : sunbeamlabs/sunbeam:${{ github.ref_name }}-slim
84+ labels : ${{ steps.meta.outputs.labels }}
85+
86+ - name : Extract cutadapt Docker metadata
87+ id : meta-cutadapt
88+ uses : docker/metadata-action@v5
89+ with :
90+ images : sunbeamlabs/cutadapt
91+ tags : |
92+ sunbeamlabs/cutadapt:${{ github.ref_name }}
93+ sunbeamlabs/cutadapt:latest
94+
95+ - name : Build and push cutadapt image
96+ uses : docker/build-push-action@v6
97+ with :
98+ context : .
99+ file : sunbeam/workflow/envs/cutadapt.Dockerfile
100+ push : true
101+ tags : ${{ steps.meta-cutadapt.outputs.tags }}
102+ labels : ${{ steps.meta-cutadapt.outputs.labels }}
103+
104+ - name : Extract komplexity Docker metadata
105+ id : meta-komplexity
106+ uses : docker/metadata-action@v5
107+ with :
108+ images : sunbeamlabs/komplexity
109+ tags : |
110+ sunbeamlabs/komplexity:${{ github.ref_name }}
111+ sunbeamlabs/komplexity:latest
112+
113+ - name : Build and push komplexity image
114+ uses : docker/build-push-action@v6
115+ with :
116+ context : .
117+ file : sunbeam/workflow/envs/komplexity.Dockerfile
118+ push : true
119+ tags : ${{ steps.meta-komplexity.outputs.tags }}
120+ labels : ${{ steps.meta-komplexity.outputs.labels }}
121+
122+ - name : Extract QC Docker metadata
123+ id : meta-qc
124+ uses : docker/metadata-action@v5
125+ with :
126+ images : sunbeamlabs/qc
127+ tags : |
128+ sunbeamlabs/qc:${{ github.ref_name }}
129+ sunbeamlabs/qc:latest
130+
131+ - name : Build and push QC image
132+ uses : docker/build-push-action@v6
133+ with :
134+ context : .
135+ file : sunbeam/workflow/envs/qc.Dockerfile
136+ push : true
137+ tags : ${{ steps.meta-qc.outputs.tags }}
138+ labels : ${{ steps.meta-qc.outputs.labels }}
0 commit comments