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

Write the output to the $GITHUB_OUTPUT file #17

Merged
merged 2 commits into from
Oct 25, 2022

Conversation

john-jam
Copy link
Contributor

This PR writes the output to the $GITHUB_OUTPUT file instead of echoing to stdout (see deprecation notes here).
Not 100% sure we have access to this file from within the container though.

Copy link
Owner

@winterjung winterjung left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I didn't notice deprecations. Except env reference, lgtm!

Co-authored-by: winterjung <me@winterjung.dev>
@john-jam john-jam requested a review from winterjung October 25, 2022 05:24
Copy link
Owner

@winterjung winterjung left a comment

Choose a reason for hiding this comment

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

lgtm

@winterjung winterjung merged commit 7f51d99 into winterjung:master Oct 25, 2022
@john-jam john-jam deleted the bugfix/set-output-deprecation branch October 25, 2022 05:26
@john-jam
Copy link
Contributor Author

🚀 Do you plan on creating a new release soon?

@winterjung
Copy link
Owner

@john-jam Sure. I have been released split@v2.1.0.

@john-jam
Copy link
Contributor Author

I am still hitting the warning but I guess it's because of the docker image (v2 tag) not yet updated.

@winterjung
Copy link
Owner

winterjung commented Oct 28, 2022

@john-jam I pushed docker image with v2 tag just before. I think you can use updated version of split actions now.

@RobKenis
Copy link

This is a breaking change lol

@winterjung
Copy link
Owner

@RobKenis Thanks for reporting. I didn't notice it's breaking changes. 🥲 Could you add more some details for me to resolve problem? (environment, usage of hosted runner, etc.)

@RobKenis
Copy link

These are the logs from the step

Run jungwinter/split@v2
  with:
    msg: my-project:./:./Dockerfile
    separator: :
    maxsplit: -1
  env:
    DOCKER_FILE_PATH: ./Dockerfile
    LEGACY_DOCKER_FILE_PATH: ./my-project/src/main/resources/docker/Dockerfile
    ARTIFACT_SRC_PATH: my-project-service-exec.jar
    ARTIFACT_DEST_PATH: my-project-service.jar
/usr/local/bin/docker run --name winterjungsplitv2_ed7206 --label 60e226 --workdir /github/workspace --rm -e "DOCKER_FILE_PATH" -e "LEGACY_DOCKER_FILE_PATH" -e "ARTIFACT_SRC_PATH" -e "ARTIFACT_DEST_PATH" -e "INPUT_MSG" -e "INPUT_SEPARATOR" -e "INPUT_MAXSPLIT" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKSPACE" -e "GITHUB_EVENT_PATH" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_ACTION" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true --network github_network_78054e55d29b48e3aed4a8e983a9d192 -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/my-project/my-project":"/github/workspace" winterjung/split:v2  "my-project:./:./Dockerfile" ":" "-1"
Error: $GITHUB_OUTPUT env is required.

We are using a hosted runner, running in an alpine-based container.
For now, we have pinned the version to v2.0.0, which resolves the issue for now.

@RobKenis
Copy link

Can you log a deprecation warning for v2 versions and make it breaking with v3 ?

@winterjung
Copy link
Owner

@RobKenis Agreed. I'll rollback the v2 docker image to 0f0d119 commit and prepare v3.

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.

3 participants