1+ name : CI/CD
2+
13on :
24 push :
35 branches :
@@ -7,6 +9,11 @@ permissions:
79 contents : write
810 pages : write
911 id-token : write
12+ packages : write
13+
14+ env :
15+ REGISTRY : ghcr.io
16+ IMAGE_NAME : ${{ github.repository }}
1017
1118jobs :
1219 build :
@@ -38,13 +45,14 @@ jobs:
3845 sudo apt-get update
3946 sudo apt-get install -y equivs
4047 equivs-build debian/control
48+ cp closure*.deb closure.deb
4149 echo -e "built=$?\ntag=$(grep -oP '(?<=^Version: ).*' debian/control)\nmessage=$(git log -1 --pretty=%B)\n" >> "$GITHUB_OUTPUT"
4250
4351 - name : Create release
4452 if : ${{ steps.build.outputs.built == '0' }}
4553 uses : ncipollo/release-action@v1
4654 with :
47- artifacts : " * .deb"
55+ artifacts : " closure .deb"
4856 body : ${{ steps.build.outputs.message }}
4957 tag : " v${{ steps.build.outputs.tag }}"
5058 commit : " master"
8189 - name : Deploy repo
8290 id : deployment
8391 uses : actions/deploy-pages@v4
92+
93+ test :
94+ runs-on : ubuntu-latest
95+ needs : deploy
96+
97+ permissions :
98+ contents : read
99+ packages : write
100+
101+ steps :
102+ - name : Checkout repository
103+ uses : actions/checkout@v4
104+
105+ - name : Log in to the Container registry
106+ uses : docker/login-action@v3.1.0
107+ with :
108+ registry : ${{ env.REGISTRY }}
109+ username : ${{ github.actor }}
110+ password : ${{ secrets.GITHUB_TOKEN }}
111+
112+ - name : Extract metadata (tags, labels) for Docker
113+ id : meta
114+ uses : docker/metadata-action@v5.5.1
115+ with :
116+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
117+
118+ - name : Build and push Docker image
119+ uses : docker/build-push-action@v5.3.0
120+ with :
121+ context : .
122+ push : true
123+ tags : ${{ steps.meta.outputs.tags }}
124+ labels : ${{ steps.meta.outputs.labels }}
0 commit comments