11name : package-makeline-service
22
33on :
4+ pull_request :
5+ branches :
6+ - " main"
7+ paths :
8+ - " src/makeline-service/**"
49 push :
510 branches :
6- - ' main'
11+ - " main"
712 paths :
8- - ' src/makeline-service/**'
13+ - " src/makeline-service/**"
914
1015 workflow_dispatch :
1116
@@ -15,7 +20,6 @@ permissions:
1520
1621jobs :
1722 publish-container-image :
18-
1923 runs-on : ubuntu-latest
2024
2125 steps :
@@ -40,25 +44,25 @@ jobs:
4044
4145 - name : Set up Docker Buildx
4246 uses : docker/setup-buildx-action@v2
43-
47+
4448 - name : Login to GitHub Container Registry
45- uses : docker/login-action@v1
49+ uses : docker/login-action@v1
4650 with :
4751 registry : ghcr.io
4852 username : ${{ github.actor }}
49- password : ${{ github.token }}
50-
53+ password : ${{ github.token }}
54+
5155 - name : Build and push
5256 uses : docker/build-push-action@v2
5357 with :
5458 context : src/makeline-service
5559 file : src/makeline-service/Dockerfile
5660 platforms : linux/amd64,linux/arm64
57- push : true
61+ push : ${{ github.event_name == 'push' }}
5862 tags : |
5963 ${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:latest
6064 ${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:${{ steps.set-variables.outputs.VERSION }}
6165 labels : |
6266 org.opencontainers.image.source=${{ github.repositoryUrl }}
6367 org.opencontainers.image.created=${{ steps.set-variables.outputs.CREATED }}
64- org.opencontainers.image.revision=${{ steps.set-variables.outputs.VERSION }}
68+ org.opencontainers.image.revision=${{ steps.set-variables.outputs.VERSION }}
0 commit comments