Skip to content

Commit e8f7185

Browse files
committed
Added github actions for container build and push.
1 parent b77537a commit e8f7185

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/ci.yml

+27
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,30 @@ jobs:
8888
# rm -rf dist
8989
# python -m build
9090
# twine upload dist/*
91+
92+
93+
publish-docker:
94+
needs: [tests]
95+
runs-on: ubuntu-latest
96+
97+
steps:
98+
- name: checkout code
99+
uses: actions/checkout@v4
100+
101+
- name: set up docker buildx
102+
uses: docker/setup-buildx-action@v2
103+
104+
- name: log in to github container registry
105+
uses: docker/login-action@v2
106+
with:
107+
registry: ghcr.io
108+
username: ${{ github.actor }}
109+
password: ${{ secrets.github_token }}
110+
111+
- name: build docker image
112+
run: |
113+
docker build -t ghcr.io/${{ github.repository }}:${{ github.sha }} .
114+
115+
- name: push docker image
116+
run: |
117+
docker push ghcr.io/${{ github.repository }}:${{ github.sha }}

0 commit comments

Comments
 (0)