Spaces:
Running
Running
name: On Push To Master | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
test-lint-ping: | |
uses: ./.github/workflows/reusable-test-lint-ping.yml | |
build-and-push-image: | |
needs: [test-lint-ping] | |
name: Publish Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Login to DockerHub | |
if: github.ref == 'refs/heads/master' | |
uses: docker/login-action@v2 | |
with: | |
username: jack20191124 | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push image to DockerHub | |
if: github.ref == 'refs/heads/master' | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: jack20191124/mini-search:latest | |
- name: Push image Description | |
if: github.ref == 'refs/heads/master' | |
uses: peter-evans/dockerhub-description@v4 | |
with: | |
username: jack20191124 | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
repository: jack20191124/mini-search | |
readme-filepath: README.md | |
sync-to-hf: | |
needs: [test-lint-ping] | |
name: Sync to HuggingFace Spaces | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- uses: JacobLinCool/huggingface-sync@v1 | |
with: | |
github: ${{ secrets.GITHUB_TOKEN }} | |
user: QubitPi | |
space: miniSearch | |
token: ${{ secrets.HF_TOKEN }} | |
configuration: "hf-space-config.yml" | |