ai69ai82 commited on
Commit
fff291f
·
verified ·
1 Parent(s): 8cbd5b0

Create .github/workflows/docker-image.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/docker-image.yml +27 -0
.github/workflows/docker-image.yml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: GHCR CI
2
+ permissions: write-all
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: lowercase repository name
16
+ run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV}
17
+
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Log in to GitHub Container Registry
21
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
22
+
23
+ - name: Build the Docker image
24
+ run: docker build . --file Dockerfile --tag ghcr.io/${{ env.IMAGE_NAME }}:latest
25
+
26
+ - name: Push the Docker image
27
+ run: docker push ghcr.io/${{ env.IMAGE_NAME }}:latest