File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -85,16 +85,27 @@ We'll start by creating the workflow file to publish a Docker image to GitHub Pa
85
85
publish :
86
86
runs-on : ubuntu-latest
87
87
steps :
88
- - uses : actions/checkout@v3
88
+ - name : Checkout
89
+ uses : actions/checkout@v3
89
90
# Add your test steps here if needed...
90
- - name : Build container
91
- uses : docker/build-push-action@v1
91
+ - name : Docker meta
92
+ id : meta
93
+ uses : docker/metadata-action@v4
94
+ with :
95
+ images : ghcr.io/YOURNAME/publish-packages/game
96
+ tags : type=sha
97
+ - name : Login to GHCR
98
+ uses : docker/login-action@v2
92
99
with :
93
- username : YOURNAME
94
- password : ${{ secrets.GITHUB_TOKEN }}
95
100
registry : ghcr.io
96
- repository : YOURNAME/publish-packages/game
97
- tag_with_sha : true
101
+ username : ${{ github.repository_owner }}
102
+ password : ${{ secrets.GITHUB_TOKEN }}
103
+ - name : Build container
104
+ uses : docker/build-push-action@v4
105
+ with :
106
+ context : .
107
+ push : true
108
+ tags : ${{ steps.meta.outputs.tags }}
98
109
` ` `
99
110
1. Replace ` YOURNAME` with your username.
100
111
1. Commit your changes.
You can’t perform that action at this time.
0 commit comments