File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Publish Docker image
2+
23on :
34 push :
45 tags :
56 - ' v*'
7+
68jobs :
7- push_to_registry :
8- name : Push Docker image to GitHub Packages
9+ push_to_registries :
10+ name : Push Docker image to multiple registries
911 runs-on : ubuntu-latest
12+ permissions :
13+ packages : write
14+ contents : read
1015 steps :
1116 - name : Check out the repo
1217 uses : actions/checkout@v2
13- - name : Push to GitHub Packages
14- uses : docker/build-push-action@v1
18+
19+ - name : Log in to Docker Hub
20+ uses : docker/login-action@v1
1521 with :
22+ username : ${{ secrets.DOCKER_USERNAME }}
23+ password : ${{ secrets.DOCKER_TOKEN }}
24+
25+ - name : Log in to the Container registry
26+ uses : docker/login-action@v1
27+ with :
28+ registry : ghcr.io
1629 username : ${{ github.actor }}
1730 password : ${{ secrets.GITHUB_TOKEN }}
18- registry : ghcr.io
19- repository : tech10/nvdaremoteserver-docker
20- tag_with_ref : true
31+
32+ - name : Extract metadata (tags, labels) for Docker
33+ id : meta
34+ uses : docker/metadata-action@v3
35+ with :
36+ images : |
37+ tech10/nvdaremoteserver
38+ ghcr.io/tech10/nvdaremoteserver-docker
39+
40+ - name : Build and push Docker images
41+ uses : docker/build-push-action@v2
42+ with :
43+ context : .
44+ push : true
45+ tags : ${{ steps.meta.outputs.tags }}
46+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments