fix(docker): Use Alpine's existing nobody user instead of creating no… #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build image | |
| run: | | |
| docker build \ | |
| -t harbor.skynetlabs.icu/apps/contextmatrix/contextmatrix:${{ github.sha }} \ | |
| -t harbor.skynetlabs.icu/apps/contextmatrix/contextmatrix:latest \ | |
| . | |
| - name: Push image | |
| run: | | |
| docker push harbor.skynetlabs.icu/apps/contextmatrix/contextmatrix:${{ github.sha }} | |
| docker push harbor.skynetlabs.icu/apps/contextmatrix/contextmatrix:latest | |
| - name: Clean up | |
| if: always() | |
| run: docker image prune -f |