File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI/CD Pipeline
2
+
3
+ on :
4
+ push :
5
+ tags : [ 'v..*' ]
6
+ workflow_dispatch :
7
+
8
+ env :
9
+ REGISTRY : ghcr.io
10
+ IMAGE_NAME : ${{ github.repository }}
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+
16
+ permissions :
17
+ packages : write
18
+ contents : read
19
+ # attestations: write
20
+ # id-token: write
21
+
22
+ steps :
23
+ - name : Check out code
24
+ uses : actions/checkout@v4
25
+ # - name: Build Docker Image
26
+ # run: docker build -t simple-flask-app_compose-flask-app:latest .
27
+
28
+ - name : Set up Docker Buildx
29
+ uses : docker/setup-buildx-action@v3.10.0
30
+
31
+ - name : Log in to GitHub Container Registry
32
+ uses : docker/login-action@v3.4.0
33
+ with :
34
+ registry : ghcr.io
35
+ username : ${{ github.repository_owner }}
36
+ password : ${{ secrets.TESTES_TOKEN }}
37
+
38
+ - name : Extract Docker metadata
39
+ id : meta
40
+ uses : docker/metadata-action@v5.7.0
41
+ with :
42
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43
+
44
+ - name : Build and push Docker image
45
+ id : build-and-push
46
+ uses : docker/build-push-action@v6.15.0
47
+ with :
48
+ context : .
49
+ push : true
50
+ tags : ${{ steps.meta.outputs.tags }}
51
+ labels : ${{ steps.meta.outputs.labels }}
52
+ cache-from : type=gha
53
+ cache-to : type=gha,mode=max
54
+ provenance : false
You can’t perform that action at this time.
0 commit comments