File tree Expand file tree Collapse file tree 3 files changed +79
-51
lines changed
Expand file tree Collapse file tree 3 files changed +79
-51
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Evaluate
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+ jobs :
8+ test :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout repository
12+ uses : actions/checkout@v4.0.0
13+
14+ - name : Set up Python
15+ uses : actions/setup-python@v5
16+ with :
17+ python-version : ' 3.12.x'
18+ architecture : ' x64'
19+ cache : ' pip'
20+
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install -r requirements.txt
25+
26+ - name : Test with pytest
27+ run : |
28+ pip install pytest pytest-cov
29+ pytest
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ release :
8+ types : [published]
9+
10+ jobs :
11+ push_to_registry :
12+ name : Push Docker image to Docker Hub
13+ runs-on : ubuntu-latest
14+ permissions :
15+ packages : write
16+ contents : read
17+ attestations : write
18+ id-token : write
19+ steps :
20+ - name : Check out the repo
21+ uses : actions/checkout@v4
22+
23+ - name : Log in to Docker Hub
24+ uses : docker/login-action@v3
25+ with :
26+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
27+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
28+
29+ - name : Extract metadata (tags, labels) for Docker
30+ id : meta
31+ uses : docker/metadata-action@v5
32+ with :
33+ images : ${{ secrets.DOCKER_HUB_USERNAME }}/ai-chatbot-framework_backend
34+
35+ - name : Build and push Docker image
36+ id : push
37+ uses : docker/build-push-action@v6
38+ with :
39+ context : .
40+ file : ./Dockerfile
41+ push : true
42+ tags : ${{ steps.meta.outputs.tags }}
43+ labels : ${{ steps.meta.outputs.labels }}
44+
45+ - name : Generate artifact attestation
46+ uses : actions/attest-build-provenance@v2
47+ with :
48+ subject-name : ${{ secrets.DOCKER_HUB_USERNAME }}/ai-chatbot-framework_backend
49+ subject-digest : ${{ steps.push.outputs.digest }}
50+ push-to-registry : true
You can’t perform that action at this time.
0 commit comments