Skip to content

Commit

Permalink
Merge pull request #15 from paulzierep/deploy-results-to-different-br…
Browse files Browse the repository at this point in the history
…anch

Deploy results to different branch
  • Loading branch information
paulzierep authored Jul 25, 2024
2 parents 344b1d6 + bed776f commit d2b2e74
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 34 deletions.
31 changes: 1 addition & 30 deletions .github/workflows/fetch_all_tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/utilities.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ A GitHub action performs every week the following steps:
3. Run the script to extract all tools
```
$ python bin/extract_all_tools.sh
$ bash bin/extract_all_tools.sh
```
The script will generate a TSV file with each tool found in the list of GitHub repositories and metadata for these tools:
Expand Down Expand Up @@ -152,7 +152,7 @@ A GitHub action performs every week the following steps:
3. Run the script
```
$ python bin/extract_all_tutorials.sh
$ bash bin/extract_all_tutorials.sh
```
## Filter tutorials based on tags outside a GitHub Action
Expand Down
2 changes: 1 addition & 1 deletion bin/extract_all_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mkdir -p 'results/'

if [ ! -z $1 ]
then
if [ $1=="test" ]
if [ $1 == "test" ]
then
echo "Test tool extraction"
python bin/extract_galaxy_tools.py \
Expand Down
2 changes: 1 addition & 1 deletion bin/get_community_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# stop on error
set -e

if [[ ! -z $1 && $1=="test" ]]; then
if [[ ! -z $1 && $1 == "test" ]]; then
python bin/extract_galaxy_tools.py \
filter \
--all "results/all_tools.json" \
Expand Down

0 comments on commit d2b2e74

Please sign in to comment.