File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Publish to PyPI
1+ name : Publish
22
33on :
44 release :
55 types : [published]
66 workflow_dispatch :
77
8+ permissions :
9+ contents : read
10+
811jobs :
912 pypi :
1013 runs-on : ubuntu-latest
1922 env :
2023 TWINE_USERNAME : __token__
2124 TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
25+
26+ docker :
27+ runs-on : ubuntu-latest
28+ steps :
29+ - uses : actions/checkout@v4
30+ - name : Log in to ghcr.io
31+ uses : docker/login-action@v3
32+ with :
33+ registry : ghcr.io
34+ username : ${{ github.actor }}
35+ password : ${{ secrets.GITHUB_TOKEN }}
36+ - name : Build and push
37+ uses : docker/build-push-action@v5
38+ with :
39+ context : .
40+ push : true
41+ tags : ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ github.ref_name }}
42+
43+ deploy-hf :
44+ runs-on : ubuntu-latest
45+ steps :
46+ - uses : actions/checkout@v4
47+ - name : Push to HuggingFace Spaces
48+ env :
49+ HF_TOKEN : ${{ secrets.HF_TOKEN }}
50+ run : |
51+ git remote add hf https://user:${HF_TOKEN}@huggingface.co/spaces/Syntho/palisade-scanner
52+ git push hf main
You can’t perform that action at this time.
0 commit comments