File tree 1 file changed +35
-2
lines changed
1 file changed +35
-2
lines changed Original file line number Diff line number Diff line change 1
- name : PR Checks
2
- on : [pull_request]
1
+ name : CI/CD Workflow
2
+ on :
3
+ pull_request :
4
+ push :
5
+ branches :
6
+ - main
7
+
3
8
jobs :
4
9
install_modules :
5
10
runs-on : ubuntu-latest
77
82
name : Base Setup
78
83
- name : Building app
79
84
run : pnpm run build
85
+
86
+ docker-publish :
87
+ if : github.ref == 'refs/heads/main'
88
+ runs-on : ubuntu-latest
89
+ needs : build
90
+ steps :
91
+ - name : Checkout code
92
+ uses : actions/checkout@v4
93
+
94
+ - name : Set up Docker Buildx
95
+ uses : docker/setup-buildx-action@v2
96
+
97
+ - name : Log in to GitHub Container Registry
98
+ uses : docker/login-action@v2
99
+ with :
100
+ registry : ghcr.io
101
+ username : ${{ github.actor }}
102
+ password : ${{ secrets.GITHUB_TOKEN }}
103
+
104
+ - name : Build and push Docker image
105
+ uses : docker/build-push-action@v5
106
+ with :
107
+ context : .
108
+ push : true
109
+ tags : ghcr.io/inkonchain/docs:latest
110
+
111
+ - name : Log out from GitHub Container Registry
112
+ run : docker logout ghcr.io
You can’t perform that action at this time.
0 commit comments