File tree Expand file tree Collapse file tree 1 file changed +18
-12
lines changed
Expand file tree Collapse file tree 1 file changed +18
-12
lines changed Original file line number Diff line number Diff line change 1414jobs :
1515 build :
1616 runs-on : ubuntu-latest
17+ permissions :
18+ contents : read
19+ packages : write
20+ timeout-minutes : 60
1721
1822 steps :
1923 - name : validate input
@@ -27,15 +31,17 @@ jobs:
2731 with :
2832 fetch-depth : 1
2933
30- - name : docker build
31- run : |
32- cd docker/${DOCKER_IMAGE_NAME1}
33- docker build -t ghcr.io/shimat/opencvsharp/${DOCKER_IMAGE_NAME1}:${{ github.event.inputs.docker_image_tag }} .
34-
35- - name : docker login
36- run : |
37- echo ${{secrets.GH_PACKAGES_PAT}} | docker login ghcr.io -u shimat --password-stdin
38-
39- - name : docker push
40- run : |
41- docker push ghcr.io/shimat/opencvsharp/${DOCKER_IMAGE_NAME1}:${{ github.event.inputs.docker_image_tag }}
34+ - name : Log into registry
35+ uses : docker/login-action@v3
36+ with :
37+ registry : ghcr.io
38+ username : ${{ github.actor }}
39+ password : ${{ secrets.GITHUB_TOKEN }}
40+
41+ - name : Build and push Docker image
42+ id : build-and-push
43+ uses : docker/build-push-action@v6
44+ with :
45+ context : docker/${{ env.DOCKER_IMAGE_NAME1 }}
46+ push : true
47+ tags : ghcr.io/shimat/opencvsharp/${{ env.DOCKER_IMAGE_NAME1 }}:${{ github.event.inputs.docker_image_tag }}
You can’t perform that action at this time.
0 commit comments