File tree Expand file tree Collapse file tree 1 file changed +43
-14
lines changed Expand file tree Collapse file tree 1 file changed +43
-14
lines changed Original file line number Diff line number Diff line change 1
1
name : Build
2
-
3
2
on :
4
- pull_request :
5
3
push :
6
4
branches :
7
- - main
5
+ - ' master'
6
+ tags :
7
+ - ' v*.*.*'
8
+ pull_request :
9
+ branches :
10
+ - ' master'
8
11
9
12
jobs :
10
- build-cardinal :
11
- name : Cardinal
13
+ build :
14
+ name : Build
12
15
runs-on : ubuntu-latest
13
- defaults :
14
- run :
15
- working-directory : ./cardinal
16
+ env :
17
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
18
+ DOCKER_REGISTRY : ghcr.io
19
+ DOCKER_IMAGE_NAME : ${{ github.repository }}
16
20
steps :
17
- - name : Checkout
18
- uses : actions/checkout@v4
19
- - name : Setup Docker Build
20
- uses : docker/setup-buildx-action@v2
21
- - name : Build Cardinal Docker Image
22
- run : docker build .
21
+ - name : Check out the repo
22
+ uses : actions/checkout@v2
23
+
24
+ - name : Set up Docker Buildx
25
+ uses : docker/setup-buildx-action@v1
26
+
27
+ - name : Log in to the registry
28
+ uses : docker/login-action@v1
29
+ with :
30
+ registry : ${{ env.DOCKER_REGISTRY }}
31
+ username : ${{ github.actor }}
32
+ password : ${{ secrets.GITHUB_TOKEN }}
33
+
34
+ # Cardinal
35
+
36
+ - name : Cardinal image tags & labels
37
+ id : meta-cardinal
38
+ uses : docker/metadata-action@v3
39
+ with :
40
+ images : ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}-cardinal
41
+
42
+ - name : Cardinal image build & push
43
+ uses : docker/build-push-action@v2
44
+ with :
45
+ context : ./cardinal
46
+ file : Dockerfile
47
+ push : true
48
+ cache-from : type=gha
49
+ cache-to : type=gha,mode=max
50
+ tags : ${{ steps.meta-cardinal.outputs.tags }}
51
+ labels : ${{ steps.meta-cardinal.outputs.labels }}
You can’t perform that action at this time.
0 commit comments