Skip to content

Commit

Permalink
Merge pull request #5 from ICGC-TCGA-PanCancer/[email protected]
Browse files Browse the repository at this point in the history
[release]
  • Loading branch information
junjun-zhang authored Feb 9, 2021
2 parents 15d6aa5 + 84ed006 commit 10660d7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
pip install wfpm
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Install Nextflow
run: |
Expand All @@ -99,7 +100,6 @@ jobs:
sudo mv nextflow /usr/local/bin/
- name: "Login to GitHub Container Registry" # normally shouldn't need to loging, but new image when just created is private
if: ${{ needs.build.outputs.branch != 'main' }}
uses: docker/login-action@v1
with:
registry: ghcr.io
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
shell: bash
run: |
./scripts/cleanup_temp_files.sh # just in case
PKG_TAR=${{ steps.get_pkg_info.outputs.pkg_name }}.${{ steps.get_pkg_info.outputs.pkg_ver }}.tar.gz
PKG_TAR=${{ steps.get_pkg_info.outputs.pkg_name }}.v${{ steps.get_pkg_info.outputs.pkg_ver }}.tar.gz
pushd ${{ steps.get_pkg_info.outputs.pkg_name }}
tar --exclude=wfpr_modules --dereference -czvf ../$PKG_TAR .
popd
Expand All @@ -172,10 +172,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_pkg_info.outputs.pkg_name }}.${{ steps.get_pkg_info.outputs.pkg_ver }}
release_name: ${{ steps.get_pkg_info.outputs.pkg_name }}.${{ steps.get_pkg_info.outputs.pkg_ver }}
tag_name: ${{ steps.get_pkg_info.outputs.pkg_name }}.v${{ steps.get_pkg_info.outputs.pkg_ver }}
release_name: ${{ steps.get_pkg_info.outputs.pkg_name }}.v${{ steps.get_pkg_info.outputs.pkg_ver }}
body: |
* Release `${{ steps.get_pkg_info.outputs.pkg_name }}.${{ steps.get_pkg_info.outputs.pkg_ver }}` (${{ github.sha }})
* Release `${{ steps.get_pkg_info.outputs.pkg_name }}.v${{ steps.get_pkg_info.outputs.pkg_ver }}` (${{ github.sha }})
* Package `${{ steps.prep_assets.outputs.pkg_tar }}` (sha256: `${{ steps.prep_assets.outputs.pkg_tar_sha }}`)
draft: false
prerelease: false
Expand All @@ -184,6 +184,7 @@ jobs:
if: ${{ steps.to_release.outputs.release == 'Y' }}
shell: bash
run: |
WFPM_VER=$(wfpm -v | cut -d ' ' -f 2)
if [[ '${{ steps.get_pkg_info.outputs.docker_file }}' != '' ]]; then
docker pull ${{ steps.get_pkg_info.outputs.docker_image }} | tee image.info
IMAGE_SHA=$(cat ./image.info | tr ' ' '\n' | grep 'sha256:' | awk -F':' '{print $2}')
Expand All @@ -192,7 +193,7 @@ jobs:
fi
# temporary solution
TAG="${{ steps.get_pkg_info.outputs.pkg_name }}.${{ steps.get_pkg_info.outputs.pkg_ver }}"
TAG="${{ steps.get_pkg_info.outputs.pkg_name }}.v${{ steps.get_pkg_info.outputs.pkg_ver }}"
./scripts/prepare_package_release_json.py -p ${{ steps.get_pkg_info.outputs.pkg_name }}/pkg.json -d \
"
{
Expand Down Expand Up @@ -224,7 +225,8 @@ jobs:
\"_image_digest\": {
\"checksum\": \"$IMAGE_SHA\",
\"checksum_type\": \"sha256\"
}
},
\"_wfpm_ver\": \"$WFPM_VER\"
}
" > pkg-release.json
Expand Down
2 changes: 1 addition & 1 deletion fastqc-wf2/fastqc-wf2.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env nextflow

nextflow.enable.dsl = 2
version = '0.1.0' // package version
version = '0.1.2'

// universal params go here, change default value as needed
params.container_version = ""
Expand Down
2 changes: 1 addition & 1 deletion fastqc-wf2/pkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fastqc-wf2",
"version": "0.1.0",
"version": "0.1.2",
"description": "FastQC workflow",
"main": "fastqc-wf2",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions scripts/prepare_package_release_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def update_image_digest(package_meta, release_meta_str):
if 'container' in package_meta:
package_meta['container']['_image_digest'] = release_meta['_image_digest']
package_meta['_release'] = release_meta['_release']
package_meta['_wfpm_ver'] = release_meta.get('_wfpm_ver')

return package_meta

Expand Down

0 comments on commit 10660d7

Please sign in to comment.