Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add callable workflows #38

Merged
merged 17 commits into from
Jul 17, 2024
Merged

Add callable workflows #38

merged 17 commits into from
Jul 17, 2024

Conversation

rcannood
Copy link
Member

@rcannood rcannood commented Jul 4, 2024

New functionality

.github/workflows/build.yaml: Added a callable workflow for building Viash components (PR #38).

.github/workflows/test.yaml: Added a callable workflow for testing Viash components (PR #38).

Base automatically changed from fix/skip_if_no_test_resources to main July 5, 2024 09:59
@rcannood rcannood requested a review from DriesSchaumont July 5, 2024 10:13

if [[ -z $VERSION ]]; then
TARGET_BRANCH="build/$SOURCE_BRANCH"
VERSION=$(echo $TARGET_BRANCH | sed 's/[^a-zA-Z0-9_]/_/g')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a good idea to quote here because $TARGET_BRANCH could (but should not) contain any weird characters

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

version: ${{ steps.variables.outputs.version }}

- name: Deploy to target branch
uses: peaceiris/actions-gh-pages@v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work with symbolic links, but does work when the branch already exists, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. I'd be up for replacing this step.

.github/workflows/build.yaml Show resolved Hide resolved


- uses: viash-io/viash-actions/project/build-target@v6
id: build-target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: this already removes .gitignore stuff, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!

  • updates the gitignore
  • sets the .version in _viash.yaml
  • builds the target dir
  • builds the nextflow schemas
  • builds the nextflow param files
  • create a matrix of docker executables which still need their docker image built

run: |
${{matrix.component.executable}} ---engine docker ---setup build ---verbose

- name: Push image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes it might be nice not to update containers (e.g. a release build). Perhaps add this option?
Two options here:

  1. Add another argument to specify the target_tag to use.
  2. Just not build the containers and assume they are already there given the provided tag

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Can I call the argument something like reuse_preexisting_docker_tag?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed it to: retag_image_tag

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested functionality tho! 🤪

.github/workflows/test.yaml Outdated Show resolved Hide resolved
.github/workflows/test.yaml Outdated Show resolved Hide resolved
@viash-io viash-io deleted a comment from DriesSchaumont Jul 5, 2024
.github/workflows/build.yaml Show resolved Hide resolved


- uses: viash-io/viash-actions/project/build-target@v6
id: build-target
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!

  • updates the gitignore
  • sets the .version in _viash.yaml
  • builds the target dir
  • builds the nextflow schemas
  • builds the nextflow param files
  • create a matrix of docker executables which still need their docker image built

@rcannood rcannood merged commit a47da7a into main Jul 17, 2024
@rcannood rcannood deleted the feature/add_test_workflow branch July 17, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants