From 3a20bfdf109aee2e910d6600ed89af896c959aba Mon Sep 17 00:00:00 2001 From: Samriti Sadhu Date: Wed, 25 Sep 2024 14:43:48 +0100 Subject: [PATCH 1/2] Creating a new action for digital-land DB build only to dev --- .github/workflows/run_dev.yml | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/run_dev.yml diff --git a/.github/workflows/run_dev.yml b/.github/workflows/run_dev.yml new file mode 100644 index 0000000..c95b72c --- /dev/null +++ b/.github/workflows/run_dev.yml @@ -0,0 +1,66 @@ +name: Build the digital-land database on dev +on: + schedule: + - cron: 0 5 * * * + workflow_dispatch: null +env: + DLB_BOT_EMAIL: ${{ secrets.DLB_BOT_EMAIL }} + DLB_BOT_TOKEN: ${{ secrets.DLB_BOT_TOKEN }} + DLB_BOT_USERNAME: ${{ secrets.DLB_BOT_USERNAME }} +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Free up disk space + run: | + df -h + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + echo + df -h + + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + + - name: Configure git + run: | + git config user.email "${DLB_BOT_EMAIL}" + git config user.name "${DLB_BOT_USERNAME}" + git remote set-url origin https://${DLB_BOT_USERNAME}:${DLB_BOT_TOKEN}@github.com/${GITHUB_REPOSITORY}.git + git checkout ${GITHUB_REF_NAME} + + - name: Update makerules + run: make makerules + + - name: Commit updated makerules + run: make commit-makerules + + - name: Install dependencies + run: make init + + - name: Clobber dataset + run: make clobber + + - name: Build dataset + run: make + + # Development + - name: Configure Development AWS Credentials + uses: aws-actions/configure-aws-credentials@v1-node16 + with: + aws-access-key-id: ${{secrets.DEVELOPMENT_AWS_ACCESS_KEY_ID}} + aws-secret-access-key: ${{secrets.DEVELOPMENT_AWS_ACCESS_SECRET}} + aws-region: eu-west-2 + + - name: Save datasets to Development S3 + env: + COLLECTION_DATASET_BUCKET_NAME: ${{secrets.DEVELOPMENT_DATA_S3_BUCKET}} + HOISTED_COLLECTION_DATASET_BUCKET_NAME: ${{secrets.DEVELOPMENT_DATA_S3_BUCKET}} + run: make save-dataset + + \ No newline at end of file From b87d0dcfb844a0d4e68174fee9e2d2f1618f43d4 Mon Sep 17 00:00:00 2001 From: Samriti Sadhu Date: Wed, 25 Sep 2024 14:44:38 +0100 Subject: [PATCH 2/2] removing the cron --- .github/workflows/run_dev.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/run_dev.yml b/.github/workflows/run_dev.yml index c95b72c..c75f59d 100644 --- a/.github/workflows/run_dev.yml +++ b/.github/workflows/run_dev.yml @@ -1,7 +1,5 @@ name: Build the digital-land database on dev on: - schedule: - - cron: 0 5 * * * workflow_dispatch: null env: DLB_BOT_EMAIL: ${{ secrets.DLB_BOT_EMAIL }}