forked from Elisseeff-Lab/domino
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow to copy files to bioconductor branch
- Loading branch information
1 parent
04ec188
commit 4f11ed3
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Get files from directories | ||
FILES=$(find ${SRC_FOLDER_PATHS[@]} -type f) | ||
|
||
# Add indicated individual files | ||
for F in ${SRC_FILE_PATHS[@]} | ||
do | ||
FILES+=" ${F}" | ||
done | ||
|
||
# Pass these to github: | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email '[email protected]' | ||
# Fetch branches | ||
git fetch | ||
# Checkout target branch | ||
git checkout $TARGET_BRANCH | ||
# Copy files in $FILES list from master branch | ||
git checkout master -- $FILES | ||
# Commit to the repository (ignore if no changes) | ||
git add -A | ||
git diff-index --quiet HEAD || git commit -am "update files" | ||
# Push to remote branch | ||
git push origin $TARGET_BRANCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Update Bioconductor package files | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
copy: | ||
name: Copy files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: copy | ||
env: | ||
SRC_FOLDER_PATHS: (data-raw man R tests vignettes) | ||
SRC_FILE_PATHS: (DESCRIPTION LICENSE NAMESPACE NEWS.md README.md) | ||
TARGET_BRANCH: 'bioconductor' | ||
run: .github/copy_to_branch.sh |