Skip to content

Commit 046dc01

Browse files
committed
add workflow file
1 parent f8761dc commit 046dc01

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/build_container.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build and Release Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_and_push:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
packages: write
13+
contents: read
14+
15+
steps:
16+
- name: Check out the repository
17+
uses: actions/checkout@v2
18+
19+
- name: Log in to GitHub Container Registry
20+
uses: docker/login-action@v1
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Build and push Docker image
27+
run: |
28+
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/your-image-name:latest
29+
docker build -t $IMAGE_NAME .
30+
docker push $IMAGE_NAME

0 commit comments

Comments
 (0)