Skip to content

Commit

Permalink
Merge pull request #474 from sunbeam-labs/472-452-release
Browse files Browse the repository at this point in the history
4.5.2.dev2 release
  • Loading branch information
Ulthran authored Apr 2, 2024
2 parents d3b914b + 46edcde commit eb3ea73
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 86 deletions.
79 changes: 71 additions & 8 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,44 @@ name: Push to DockerHub

on:
workflow_call:
inputs:
version:
description: "Sunbeam version"
required: true
type: string
outputs:
sunbeam_package_versions:
description: "Versions in main Sunbeam image"
value: ${{ jobs.push-dockerhub.outputs.package_versions }}
sunbeam_package_versions_slim:
description: "Versions in slim Sunbeam image"
value: ${{ jobs.push-dockerhub.outputs.package_versions_slim }}
cutadapt_package_versions:
description: "Versions in cutadapt image"
value: ${{ jobs.push-cutadapt-dockerhub.outputs.package_versions }}
komplexity_package_versions:
description: "Versions in komplexity image"
value: ${{ jobs.push-komplexity-dockerhub.outputs.package_versions }}
qc_package_versions:
description: "Versions in qc image"
value: ${{ jobs.push-qc-dockerhub.outputs.package_versions }}
reports_package_versions:
description: "Versions in reports image"
value: ${{ jobs.push-reports-dockerhub.outputs.package_versions }}

workflow_dispatch:

jobs:
push-dockerhub:
name: Push to Dockerhub
runs-on: ubuntu-latest

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}
package_versions_slim: ${{ steps.report.outputs.package_versions_slim }}

steps:
- uses: actions/checkout@v4

- id: get_version
uses: battila7/get-version-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand Down Expand Up @@ -58,23 +83,32 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: sunbeamlabs/sunbeam:latest, sunbeamlabs/sunbeam:${{ steps.get_version.outputs.version-without-v }}
tags: sunbeamlabs/sunbeam:latest, sunbeamlabs/sunbeam:${{ inputs.version }}
labels: ${{ steps.meta.outputs.labels }}
build-args: "SUNBEAM_VER=${{ steps.get_version.outputs.version-without-v }}"
build-args: "SUNBEAM_VER=${{ inputs.version }}"

- name: Build and push slim Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./slim.Dockerfile
push: true
tags: sunbeamlabs/sunbeam:${{ steps.get_version.outputs.version-without-v }}-slim
tags: sunbeamlabs/sunbeam:${{ inputs.version }}-slim
labels: ${{ steps.meta.outputs.labels }}
build-args: "SUNBEAM_VER=${{ steps.get_version.outputs.version-without-v }}"
build-args: "SUNBEAM_VER=${{ inputs.version }}"

- name: Generate image report
id: report
run: |
echo "package_versions=$(docker run --rm sunbeamlabs/sunbeam:${{ inputs.version }} cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
echo "package_versions_slim=$(docker run --rm sunbeamlabs/sunbeam:${{ inputs.version }}-slim cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
push-cutadapt-dockerhub:
name: Push cutadapt env to Dockerhub
runs-on: ubuntu-latest

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- uses: actions/checkout@v4
Expand All @@ -100,9 +134,17 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate image report
id: report
run: |
echo "package_versions=$(docker run --rm sunbeamlabs/cutadapt:${{ inputs.version }} cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
push-komplexity-dockerhub:
name: Push komplexity env to Dockerhub
runs-on: ubuntu-latest

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- uses: actions/checkout@v4
Expand All @@ -128,9 +170,17 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate image report
id: report
run: |
echo "package_versions=$(docker run --rm sunbeamlabs/komplexity:${{ inputs.version }} cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
push-qc-dockerhub:
name: Push qc env to Dockerhub
runs-on: ubuntu-latest

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- uses: actions/checkout@v4
Expand All @@ -156,9 +206,17 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate image report
id: report
run: |
echo "package_versions=$(docker run --rm sunbeamlabs/qc:${{ inputs.version }} cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
push-reports-dockerhub:
name: Push reports env to Dockerhub
runs-on: ubuntu-latest

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- uses: actions/checkout@v4
Expand All @@ -182,4 +240,9 @@ jobs:
file: workflow/envs/reports.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate image report
id: report
run: |
echo "package_versions=$(docker run --rm sunbeamlabs/reports:${{ inputs.version }} cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
83 changes: 6 additions & 77 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: ${{ github.event.release.id }}
body: "### Sunbeam Tarball\nDownload the Sunbeam tarball from the release page to install Sunbeam locally.\n[Download Sunbeam Tarball](https://github.com/sunbeam-labs/sunbeam/releases/${{ needs.check-version.outputs.version-without-v }}/download/sunbeam.tar.gz"
replacebody: false
files: "sunbeam.tar.gz"

test-tarball:
Expand Down Expand Up @@ -94,98 +96,25 @@ jobs:
push-dockerhub:
uses: ./.github/workflows/dockerhub.yml
with:
version: ${{ needs.check-version.outputs.version-without-v }}
secrets: inherit
needs:
- run-tests
- check-version

generate-docker-reports-sunbeam:
runs-on: ubuntu-latest
container: sunbeamlabs/sunbeam:${{ needs.check-version.outputs.version-without-v }}
needs: [push-dockerhub, check-version]

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- name: Generate image report
id: report
run: |
echo "package_versions=$(cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
generate-docker-reports-cutadapt:
runs-on: ubuntu-latest
container: sunbeamlabs/cutadapt:${{ needs.check-version.outputs.version-without-v }}
needs: [push-dockerhub, check-version]

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- name: Generate image report
id: report
run: |
echo "package_versions=$(cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
generate-docker-reports-komplexity:
runs-on: ubuntu-latest
container: sunbeamlabs/komplexity:${{ needs.check-version.outputs.version-without-v }}
needs: [push-dockerhub, check-version]

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- name: Generate image report
id: report
run: |
echo "package_versions=$(cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
generate-docker-reports-qc:
runs-on: ubuntu-latest
container: sunbeamlabs/qc:${{ needs.check-version.outputs.version-without-v }}
needs: [push-dockerhub, check-version]

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- name: Generate image report
id: report
run: |
echo "package_versions=$(cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
generate-docker-reports-reports:
runs-on: ubuntu-latest
container: sunbeamlabs/reports:${{ needs.check-version.outputs.version-without-v }}
needs: [push-dockerhub, check-version]

outputs:
package_versions: ${{ steps.report.outputs.package_versions }}

steps:
- name: Generate image report
id: report
run: |
echo "package_versions=$(cat installed_packages.txt)" >> "$GITHUB_OUTPUT"
udpate-release-notes:
name: Update release notes
runs-on: ubuntu-latest
needs:
- generate-docker-reports-sunbeam
- generate-docker-reports-cutadapt
- generate-docker-reports-komplexity
- generate-docker-reports-qc
- generate-docker-reports-reports
needs: push-dockerhub

steps:
- name: Add Image Reports to Release
uses: irongut/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: ${{ github.event.release.id }}
body: "### sunbeamlabs/sunbeam\n${{ needs.generate-docker-reports-sunbeam.outputs.package_versions }}\n### sunbeamlabs/cutadapt\n${{ needs.generate-docker-reports-cutadapt.outputs.package_versions }}\n### sunbeamlabs/komplexity\n${{ needs.generate-docker-reports-komplexity.outputs.package_versions }}\n### sunbeamlabs/qc\n${{ needs.generate-docker-reports-qc.outputs.package_versions }}\n### sunbeamlabs/reports\n${{ needs.generate-docker-reports-reports.outputs.package_versions }}"
body: "### sunbeamlabs/sunbeam\n${{ needs.push-dockerhub.outputs.sunbeam_package_versions }}\n### sunbeamlabs/cutadapt\n${{ needs.push-dockerhub.outputs.cutadapt_package_versions }}\n### sunbeamlabs/komplexity\n${{ needs.push-dockerhub.outputs.komplexity_package_versions }}\n### sunbeamlabs/qc\n${{ needs.push-dockerhub.outputs.qc_package_versions }}\n### sunbeamlabs/reports\n${{ needs.push-dockerhub.outputs.reports_package_versions }}"
replacebody: false

run-integration-tests:
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

__conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
__version_tag=$(if git describe --tags >/dev/null 2>&1 ; then git describe --tags; else echo v4.5.2.dev1; fi) # <--- Update this on each version release
__version_tag=$(if git describe --tags >/dev/null 2>&1 ; then git describe --tags; else echo v4.5.2.dev2; fi) # <--- Update this on each version release
__version_tag="${__version_tag:1}" # Remove the 'v' prefix

read -r -d '' __usage <<-'EOF'
Expand Down

0 comments on commit eb3ea73

Please sign in to comment.