From 3015e2e52316e68f236828aa9124c395ea984126 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Wed, 26 Jul 2023 23:34:32 +0800 Subject: [PATCH 1/6] create hf-sync workflow --- .github/workflows/main.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..77ba4b3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,20 @@ +on: push +jobs: + huggingface-sync: + runs-on: linux + steps: + - name: Hugging Face Sync + uses: JacobLinCool/huggingface-sync@v1.0.0 + with: + # The username (your username or organization name) of the Hugging Face. + user: raashidsalih + # The space name of the Hugging Face. + space: COVID-Mortality + # The Hugging Face access token. + token: ${{ secrets.HF_TOKEN }} + # The GitHub Actions token. + github: ${{ secrets.GITHUB_TOKEN }} + # Can be either gradio, streamlit, docker, or static. + sdk: gradio + # Path to your main application file (which contains either gradio or streamlit Python code, or static html code). Path is relative to the root of the repository. + app_file: app.py From c7da4c5b299cd908e75bbc1595acaf2ea3da53b3 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Wed, 26 Jul 2023 23:39:52 +0800 Subject: [PATCH 2/6] change to ubuntu-latest runner --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 77ba4b3..a967a59 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ on: push jobs: huggingface-sync: - runs-on: linux + runs-on: ubuntu-latest steps: - name: Hugging Face Sync uses: JacobLinCool/huggingface-sync@v1.0.0 From 9488f407744a5614078031762337f1480fa5709e Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Wed, 26 Jul 2023 23:44:08 +0800 Subject: [PATCH 3/6] fix actions repo; sync only on main branch --- .github/workflows/main.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a967a59..4b4a46f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,10 +1,16 @@ -on: push +on: + push: + branches: + - main jobs: huggingface-sync: runs-on: ubuntu-latest steps: + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Hugging Face Sync - uses: JacobLinCool/huggingface-sync@v1.0.0 + uses: JacobLinCool/huggingface-sync@v1 with: # The username (your username or organization name) of the Hugging Face. user: raashidsalih From 4b17321f143befa62d424a522240b529a990086a Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Wed, 26 Jul 2023 23:45:14 +0800 Subject: [PATCH 4/6] revert to push on any branch for testing --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b4a46f..23189f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,5 @@ on: - push: - branches: - - main + push jobs: huggingface-sync: runs-on: ubuntu-latest From d764128e18dcf1047cee291ef71e6d7161194b22 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Wed, 26 Jul 2023 23:56:34 +0800 Subject: [PATCH 5/6] pin; remove comments; --- .github/workflows/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 23189f6..38eaa85 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,15 +10,12 @@ jobs: - name: Hugging Face Sync uses: JacobLinCool/huggingface-sync@v1 with: - # The username (your username or organization name) of the Hugging Face. user: raashidsalih - # The space name of the Hugging Face. space: COVID-Mortality - # The Hugging Face access token. token: ${{ secrets.HF_TOKEN }} - # The GitHub Actions token. github: ${{ secrets.GITHUB_TOKEN }} - # Can be either gradio, streamlit, docker, or static. + colorFrom: blue + colorTo: yellow sdk: gradio - # Path to your main application file (which contains either gradio or streamlit Python code, or static html code). Path is relative to the root of the repository. app_file: app.py + pinned: true From da1904e7158d2abdf20f53327270bc318d9ad5e9 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Wed, 26 Jul 2023 23:59:49 +0800 Subject: [PATCH 6/6] push only on changes to main --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38eaa85..3f341e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,7 @@ on: - push + push: + branches: + - main jobs: huggingface-sync: runs-on: ubuntu-latest