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

feat(push-image): use execFilerSync instead of docker-cli-js to execute docker #98

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

josa42
Copy link
Member

@josa42 josa42 commented Jan 4, 2024

This PR aims to solve the issues which surfaced when switching to custom github action runners:

image


Unfortunately I cannot say why, but replacing the docker-cli-js package by executing docker via child_process.execFileSync and updating the action to node 20 solved the issue.

See: https://github.com/brandwatch/frontend-apps/actions/runs/7409414270/job/20160283262

@josa42 josa42 force-pushed the josa42/replace-docker-cli-js branch from 9d0aa91 to c3d1bc2 Compare January 4, 2024 12:43
@@ -40,5 +40,5 @@ outputs:
imageDigest:
description: The image digest of the Docker image. Can be used to request a deployment.
runs:
using: node16
using: node20
Copy link
Member Author

Choose a reason for hiding this comment

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

Updating to node 20


const { execFileSync } = require('child_process');

function docker(command, ...args) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This function basically replaces docker-cli-js

@josa42 josa42 force-pushed the josa42/replace-docker-cli-js branch from c3d1bc2 to d7c784a Compare January 4, 2024 12:50
@josa42 josa42 marked this pull request as ready for review January 4, 2024 12:53
Copy link

@lukewhiting lukewhiting left a comment

Choose a reason for hiding this comment

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

Looks like a solid fix. Thanks for sorting this :-)

@josa42 josa42 merged commit 7c8ad1f into main Jan 4, 2024
4 checks passed
@josa42 josa42 deleted the josa42/replace-docker-cli-js branch January 4, 2024 14:22
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