ci: fix codecov upload
Browse files- .github/workflows/ci.yml +1 -0
- .github/workflows/docker.yml +44 -0
.github/workflows/ci.yml
CHANGED
|
@@ -56,6 +56,7 @@ jobs:
|
|
| 56 |
- name: Upload coverage to Codecov
|
| 57 |
uses: codecov/codecov-action@v3
|
| 58 |
with:
|
|
|
|
| 59 |
file: ./coverage.xml
|
| 60 |
fail_ci_if_error: true
|
| 61 |
|
|
|
|
| 56 |
- name: Upload coverage to Codecov
|
| 57 |
uses: codecov/codecov-action@v3
|
| 58 |
with:
|
| 59 |
+
token: ${{ secrets.CODECOV_TOKEN }}
|
| 60 |
file: ./coverage.xml
|
| 61 |
fail_ci_if_error: true
|
| 62 |
|
.github/workflows/docker.yml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Docker CI/CD
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [main]
|
| 6 |
+
paths:
|
| 7 |
+
- "Dockerfile"
|
| 8 |
+
- ".dockerignore"
|
| 9 |
+
- "docker-compose.yml"
|
| 10 |
+
- "pyproject.toml"
|
| 11 |
+
- "poetry.lock"
|
| 12 |
+
pull_request:
|
| 13 |
+
branches: [main]
|
| 14 |
+
paths:
|
| 15 |
+
- "Dockerfile"
|
| 16 |
+
- ".dockerignore"
|
| 17 |
+
- "docker-compose.yml"
|
| 18 |
+
- "pyproject.toml"
|
| 19 |
+
- "poetry.lock"
|
| 20 |
+
|
| 21 |
+
jobs:
|
| 22 |
+
docker:
|
| 23 |
+
runs-on: ubuntu-latest
|
| 24 |
+
steps:
|
| 25 |
+
- name: Checkout
|
| 26 |
+
uses: actions/checkout@v4
|
| 27 |
+
|
| 28 |
+
- name: Set up Docker Buildx
|
| 29 |
+
uses: docker/setup-buildx-action@v3
|
| 30 |
+
|
| 31 |
+
- name: Login to Docker Hub
|
| 32 |
+
uses: docker/login-action@v3
|
| 33 |
+
with:
|
| 34 |
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
| 35 |
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
| 36 |
+
|
| 37 |
+
- name: Build and push
|
| 38 |
+
uses: docker/build-push-action@v5
|
| 39 |
+
with:
|
| 40 |
+
context: .
|
| 41 |
+
push: ${{ github.event_name != 'pull_request' }}
|
| 42 |
+
tags: jeff52415/llmdataparser:latest
|
| 43 |
+
cache-from: type=registry,ref=jeff52415/llmdataparser:latest
|
| 44 |
+
cache-to: type=inline
|