From bed776f7d58f0b41768f00e540f6b2f58d1b463c Mon Sep 17 00:00:00 2001 From: paulzierep Date: Thu, 25 Jul 2024 10:37:04 +0200 Subject: [PATCH] move fetch all servers script to other CI --- .github/workflows/fetch_all_tools.yaml | 31 +---------------- .github/workflows/utilities.yml | 46 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/utilities.yml diff --git a/.github/workflows/fetch_all_tools.yaml b/.github/workflows/fetch_all_tools.yaml index 05ef7177..c47597f8 100644 --- a/.github/workflows/fetch_all_tools.yaml +++ b/.github/workflows/fetch_all_tools.yaml @@ -16,42 +16,13 @@ permissions: contents: write jobs: - fetch-available-servers: - runs-on: ubuntu-20.04 - name: Fetch list of all available servers - steps: - - name: Checkout main - uses: actions/checkout@v4 - with: - ref: main #pull latest code produced by job 1, not the revision that started the workflow (https://github.com/actions/checkout/issues/439) - - name: Checkout results - uses: actions/checkout@v4 - with: - ref: results - path: results - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install requirement - run: python -m pip install -r requirements.txt - - name: Run script - run: | - python bin/get_public_galaxy_servers.py -o results/available_public_servers.csv - - name: Commit servers - uses: s0/git-publish-subdir-action@develop - env: - BRANCH: results - FOLDER: results - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: self - SKIP_EMPTY_COMMITS: true fetch-all-tools-stepwise: runs-on: ubuntu-20.04 environment: fetch-tools name: Fetch all tool stepwise strategy: - max-parallel: 1 + max-parallel: 1 #need to run one after another, since otherwise there is a chance, that mulitple jobs want to push to the results branch at the same time (which fails due to merge) matrix: python-version: [3.11] subset: diff --git a/.github/workflows/utilities.yml b/.github/workflows/utilities.yml new file mode 100644 index 00000000..0e42d3fd --- /dev/null +++ b/.github/workflows/utilities.yml @@ -0,0 +1,46 @@ +name: Utilities +on: + workflow_dispatch: + schedule: + #Every Sunday at 7:00 am + - cron: "0 7 * * 0" + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "tools" + cancel-in-progress: false + +permissions: + contents: write + +jobs: + fetch-available-servers: + runs-on: ubuntu-20.04 + name: Fetch list of all available servers + steps: + - name: Checkout main + uses: actions/checkout@v4 + with: + ref: main #pull latest code produced by job 1, not the revision that started the workflow (https://github.com/actions/checkout/issues/439) + - name: Checkout results + uses: actions/checkout@v4 + with: + ref: results + path: results + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install requirement + run: python -m pip install -r requirements.txt + - name: Run script + run: | + python bin/get_public_galaxy_servers.py -o results/available_public_servers.csv + - name: Commit servers + uses: s0/git-publish-subdir-action@develop + env: + BRANCH: results + FOLDER: results + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: self + SKIP_EMPTY_COMMITS: true \ No newline at end of file