88 branches :
99 - " main"
1010
11+ workflow_dispatch :
12+
13+ env :
14+ REGISTRY : ghcr.io
15+
1116jobs :
1217 commitlint :
13- runs-on : ubuntu-22 .04
18+ runs-on : ubuntu-24 .04
1419 steps :
1520 - name : Checkout
1621 uses : actions/checkout@v4
@@ -19,34 +24,68 @@ jobs:
1924 - name : commitlint
2025 uses : wagoid/commitlint-github-action@v5
2126 test :
22- runs-on : ubuntu-22 .04
27+ runs-on : ubuntu-24 .04
2328 env :
2429 USER_ID : 1001
2530 GROUP_ID : 1001
2631 steps :
2732 - name : Checkout
2833 uses : actions/checkout@v4
2934 - name : Compose Build
30- run : docker- compose build --progress=plain
35+ run : docker compose build --progress=plain
3136 - name : Compose Up
32- run : docker- compose up -d
37+ run : docker compose up -d
3338 - name : Test
3439 run : docker compose exec app poetry run pytest
3540 release :
36- runs-on : ubuntu-22.04
37- needs : [test, commitlint]
41+ runs-on : ubuntu-24.04
3842 if : github.event_name == 'push'
43+ needs : [test, commitlint]
44+ outputs :
45+ git-tag : ${{ steps.semantic.outputs.git-tag }}
3946 steps :
4047 - name : Checkout
4148 uses : actions/checkout@v4
4249 - name : Setup Node.js
4350 uses : actions/setup-node@v4
44- with :
45- node-version : 20
4651 - name : Install semantic-release
47- run : npm i semantic-release@v23.0.0 conventional-changelog-conventionalcommits@7.0.2
48- - name : Release
52+ run : npm i semantic-release@v24.2.5 @semantic-release/exec@v7.1.0 conventional-changelog-conventionalcommits@9.0.0
53+ - name : Run semantic-release
54+ id : semantic
4955 env :
50- GITHUB_USERNAME : ${{ secrets.GH_USERNAME }}
51- GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
56+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5257 run : npx semantic-release
58+ ghcr :
59+ runs-on : ubuntu-24.04
60+ if : |
61+ github.repository_owner == 'Virtool' &&
62+ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
63+ needs.release.outputs.git-tag != ''
64+ needs : [release]
65+ steps :
66+ - name : Checkout
67+ uses : actions/checkout@v4
68+ with :
69+ ref : ${{ needs.release.outputs.git-tag }}
70+ - name : Write VERSION file
71+ run : echo ${{ needs.release.outputs.git-tag }} > VERSION
72+ - name : Login to Registry
73+ uses : docker/login-action@v3
74+ with :
75+ registry : ${{ env.REGISTRY }}
76+ username : ${{ github.actor }}
77+ password : ${{ secrets.GITHUB_TOKEN }}
78+ - name : Extract Metadata
79+ id : meta
80+ uses : docker/metadata-action@v5
81+ with :
82+ context : git
83+ images : ${{ env.REGISTRY }}/virtool/nuvs
84+ - name : Build and Push
85+ uses : docker/build-push-action@v4
86+ with :
87+ context : .
88+ labels : ${{ steps.meta.outputs.labels }}
89+ push : true
90+ tags : ${{ steps.meta.outputs.tags }}
91+ target : base
0 commit comments