Skip to content

Commit 670a043

Browse files
authored
Merge pull request #1 from arash77/galaxytool-import
Add galaxytool-import to import github action
2 parents c5c06c9 + ddd3936 commit 670a043

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/import.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,44 @@ jobs:
195195
commit_message: import biocontainers data on $(date)
196196
branch: biocontainers-import-branch
197197
create_branch: true
198+
galaxytool:
199+
runs-on: ubuntu-latest
200+
outputs:
201+
commit_hash: ${{ steps.commit-and-push-galaxytool.outputs.commit_hash }}
202+
steps:
203+
- name: checkout contents repository
204+
uses: actions/checkout@v3
205+
with:
206+
ref: ${{ github.ref }}
207+
- name: delete previous import branch
208+
run: |
209+
branch_name="galaxytool-import-branch"
210+
# Check if the branch exists on the remote repository
211+
if git rev-parse --verify --quiet "origin/$branch_name"; then
212+
# The branch exists, so it can be safely deleted
213+
git push origin --delete "$branch_name"
214+
echo "Branch $branch_name has been deleted."
215+
else
216+
# The branch does not exist
217+
echo "Branch $branch_name does not exist on the remote repository."
218+
fi
219+
- name: Create and checkout feature branch
220+
run: git checkout -b galaxytool-import-branch
221+
- name: import galaxy tool data from server
222+
uses: research-software-ecosystem/utils/galaxytool-import@main
223+
with:
224+
repo-user: ${{ secrets.GITHUB_USER }}
225+
repo-token: ${{ secrets.GITHUB_TOKEN }}
226+
- name: Commit and Push Changes
227+
id: commit-and-push-galaxytool
228+
uses: stefanzweifel/git-auto-commit-action@v5
229+
with:
230+
commit_user_name: Tools Platform Ecosystem bot
231+
commit_user_email: [email protected]
232+
commit_author: Tools Platform Ecosystem bot <[email protected]>
233+
commit_message: import galaxy tools data on $(date)
234+
branch: galaxytool-import-branch
235+
create_branch: true
198236
merge:
199237
runs-on: ubuntu-latest
200238
needs:
@@ -203,6 +241,7 @@ jobs:
203241
- bioconda
204242
- biii
205243
- biocontainers
244+
- galaxytool
206245
if: always()
207246
steps:
208247
- name: Checkout Repository
@@ -229,6 +268,7 @@ jobs:
229268
merge_branch_if_exists "bioconda-import-branch"
230269
merge_branch_if_exists "biii-import-branch"
231270
merge_branch_if_exists "biocontainers-import-branch"
271+
merge_branch_if_exists "galaxy-import-branch"
232272
git push origin master
233273
clean-branches:
234274
runs-on: ubuntu-latest
@@ -259,3 +299,4 @@ jobs:
259299
delete_branch_if_exists "bioconda-import-branch"
260300
delete_branch_if_exists "biii-import-branch"
261301
delete_branch_if_exists "biocontainers-import-branch"
302+
delete_branch_if_exists "galaxy-import-branch"

0 commit comments

Comments
 (0)