Spaces:
Running
Running
Merge branch 'main' of github.com:praiteri/pycek_public
Browse files- .github/workflows/container.yml +0 -36
- .github/workflows/space.yml +20 -0
.github/workflows/container.yml
DELETED
|
@@ -1,36 +0,0 @@
|
|
| 1 |
-
name: Build and Push to ECR
|
| 2 |
-
|
| 3 |
-
on:
|
| 4 |
-
push:
|
| 5 |
-
branches: [ main ]
|
| 6 |
-
|
| 7 |
-
jobs:
|
| 8 |
-
deploy:
|
| 9 |
-
runs-on: ubuntu-latest
|
| 10 |
-
permissions:
|
| 11 |
-
id-token: write
|
| 12 |
-
contents: read
|
| 13 |
-
|
| 14 |
-
steps:
|
| 15 |
-
- uses: actions/checkout@v3
|
| 16 |
-
|
| 17 |
-
- name: Configure AWS credentials
|
| 18 |
-
uses: aws-actions/configure-aws-credentials@v4
|
| 19 |
-
with:
|
| 20 |
-
role-to-assume: arn:aws:iam::492829927637:role/DeployContainer
|
| 21 |
-
aws-region: ap-southeast-2
|
| 22 |
-
|
| 23 |
-
- name: Login to Amazon ECR
|
| 24 |
-
id: login-ecr
|
| 25 |
-
uses: aws-actions/amazon-ecr-login@v2
|
| 26 |
-
|
| 27 |
-
- name: Build and push image to ECR
|
| 28 |
-
env:
|
| 29 |
-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
| 30 |
-
ECR_REPOSITORY: pycek-public
|
| 31 |
-
IMAGE_TAG: ${{ github.sha }}
|
| 32 |
-
working-directory: ./deployment
|
| 33 |
-
run: |
|
| 34 |
-
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest -f Dockerfile ..
|
| 35 |
-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
| 36 |
-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/space.yml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Sync to Hugging Face hub
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: [main]
|
| 5 |
+
|
| 6 |
+
# to run this workflow manually from the Actions tab
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
sync-to-hub:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
steps:
|
| 13 |
+
- uses: actions/checkout@v3
|
| 14 |
+
with:
|
| 15 |
+
fetch-depth: 0
|
| 16 |
+
lfs: true
|
| 17 |
+
- name: Push to hub
|
| 18 |
+
env:
|
| 19 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 20 |
+
run: git push https://HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/CompChemCurtin/cek main
|