File tree 1 file changed +42
-0
lines changed
1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Create and publish Docker image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' master'
7
+ pull_request :
8
+ branches :
9
+ - ' master'
10
+
11
+ env :
12
+ REGISTRY : ghcr.io
13
+ IMAGE_NAME : ce-rust/rust-cerk
14
+
15
+ jobs :
16
+ build-and-push-image :
17
+ runs-on : ubuntu-latest
18
+ permissions :
19
+ contents : read
20
+ packages : write
21
+ steps :
22
+ - name : Checkout repository
23
+ uses : actions/checkout@v4
24
+ - name : Log in to the Container registry
25
+ if : github.event_name != 'pull_request'
26
+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
27
+ with :
28
+ registry : ${{ env.REGISTRY }}
29
+ username : ${{ github.actor }}
30
+ password : ${{ secrets.GITHUB_TOKEN }}
31
+ - name : Extract metadata (tags, labels) for Docker
32
+ id : meta
33
+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
34
+ with :
35
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
36
+ - name : Build and push Docker image
37
+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
38
+ with :
39
+ context : .
40
+ push : ${{ github.event_name != 'pull_request' }}
41
+ tags : ${{ steps.meta.outputs.tags }}
42
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments