We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8a8ecf commit a701a97Copy full SHA for a701a97
1 file changed
.github/workflows/cd.yaml
@@ -0,0 +1,30 @@
1
+name: Build and Push Docker Image
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main
7
8
+permissions:
9
+ contents: read
10
+ packages: write
11
12
+jobs:
13
+ build-and-push:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
19
+ - name: Log in to GitHub Container Registry
20
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
21
22
+ - name: Build Docker image
23
+ run: |
24
+ IMAGE_NAME=ghcr.io/${{ github.repository }}:latest
25
+ docker build -t $IMAGE_NAME .
26
27
+ - name: Push Docker image to GitHub Container Registry
28
29
30
+ docker push $IMAGE_NAME
0 commit comments