@@ -105,4 +105,54 @@ jobs:
105
105
uses : pypa/gh-action-pypi-publish@release/v1
106
106
with :
107
107
packages-dir : dist/
108
- repository-url : https://test.pypi.org/legacy/
108
+ repository-url : https://test.pypi.org/legacy/
109
+ test-container :
110
+ runs-on : ubuntu-latest
111
+ needs : ['build', 'path-filter']
112
+ if : ${{ needs.path-filter.outputs.lbox == 'true' }}
113
+ strategy :
114
+ fail-fast : false
115
+ matrix :
116
+ include : ${{ fromJSON(needs.path-filter.outputs.package-matrix) }}
117
+ permissions :
118
+ # IMPORTANT: this permission is mandatory for trusted publishing
119
+ packages : write
120
+ steps :
121
+ - uses : actions/checkout@v4
122
+ with :
123
+ ref : ${{ github.head_ref }}
124
+ - name : Set up Docker Buildx
125
+ uses : docker/setup-buildx-action@v3
126
+ - name : Log in to the Container registry
127
+ uses : docker/login-action@v3
128
+ with :
129
+ registry : ghcr.io
130
+ username : ${{ github.actor }}
131
+ password : ${{ secrets.GITHUB_TOKEN }}
132
+ - name : Build and push (Develop)
133
+ if : github.event_name == 'push'
134
+ uses : docker/build-push-action@v5
135
+ with :
136
+ context : ./libs/${{ matrix.package }}
137
+ file : ./libs/${{ matrix.package }}/Dockerfile
138
+ github-token : ${{ secrets.GITHUB_TOKEN }}
139
+ push : true
140
+ platforms : |
141
+ linux/amd64
142
+ linux/arm64
143
+ tags : |
144
+ ghcr.io/${{ matrix.package }}:develop
145
+ ghcr.io/${{ matrix.package }}:${{ github.sha }}
146
+ - name : Build and push (Pull Request)
147
+ if : github.event_name == 'pull_request'
148
+ uses : docker/build-push-action@v5
149
+ with :
150
+ context : ./libs/${{ matrix.package }}
151
+ file : ./libs/${{ matrix.package }}/Dockerfile
152
+ github-token : ${{ secrets.GITHUB_TOKEN }}
153
+ push : true
154
+ platforms : |
155
+ linux/amd64
156
+ linux/arm64
157
+ tags : |
158
+ ghcr.io/${{ matrix.package }}:${{ github.sha }}
0 commit comments