File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
fastapi/.github/workflows Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy to Valyent
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ pull_request :
7+ branches : ["main"]
8+
9+ jobs :
10+ build-and-deploy :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+
19+ - name : Login to Valyent Registry
20+ uses : docker/login-action@v3
21+ with :
22+ registry : registry.valyent.cloud
23+ username : ${{ github.actor }}
24+ password : ${{ secrets.VALYENT_API_TOKEN }}
25+
26+ - name : Extract metadata (tags, labels) for Docker
27+ id : meta
28+ uses : docker/metadata-action@v5
29+ with :
30+ images : registry.valyent.cloud/${{ secrets.VALYENT_ORG }}/${{ secrets.VALYENT_APP }}
31+ tags : |
32+ type=ref,event=branch
33+ type=ref,event=pr
34+ type=sha,format=long
35+ type=raw,value=latest,enable={{is_default_branch}}
36+
37+ - name : Build and push Docker image
38+ uses : docker/build-push-action@v5
39+ with :
40+ context : .
41+ push : true
42+ tags : ${{ steps.meta.outputs.tags }}
43+ labels : ${{ steps.meta.outputs.labels }}
44+
45+ - name : Install Valyent CLI
46+ run : curl -L https://cli.valyent.cloud | sh
47+
48+ - name : Deploy to Valyent
49+ run : |
50+ valyent deploy --no-build \
51+ --organization ${{ secrets.VALYENT_ORG }} \
52+ --fleet ${{ secrets.VALYENT_APP }}
You can’t perform that action at this time.
0 commit comments