File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change 13
13
paths :
14
14
- " Dockerfile"
15
15
workflow_dispatch :
16
+ env :
17
+ REGISTRY : ghcr.io
18
+ IMAGE_NAME : ${{ github.repository }}/gtk4
16
19
17
20
jobs :
18
21
docker :
19
- runs-on : ubuntu-22.04
22
+ permissions :
23
+ contents : read
24
+ packages : write
25
+ runs-on : ubuntu-latest
20
26
steps :
21
27
- uses : actions/checkout@v4
22
- - name : Push to GitHub Packages
23
- uses : docker/build-push-action@v5
28
+
29
+ - name : Log in to the Container registry
30
+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
24
31
with :
25
- push : ${{ github.event_name != 'pull_request' }}
32
+ registry : ${{ env.REGISTRY }}
26
33
username : ${{ github.actor }}
27
34
password : ${{ secrets.GITHUB_TOKEN }}
28
- registry : ghcr.io
29
- repository : ${{ github.repository }}/gtk4
35
+
36
+ - name : Extract metadata (tags, labels) for Docker
37
+ id : meta
38
+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
39
+ with :
40
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
41
+
42
+ - name : Build and push Docker image
43
+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
44
+ with :
45
+ push : ${{ github.event_name != 'pull_request' }}
46
+ context : .
30
47
tags : latest
48
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments