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

Create check-dist.yml #365

Closed
wants to merge 1 commit into from
Closed

Create check-dist.yml #365

wants to merge 1 commit into from

Conversation

jongwooo
Copy link

Signed-off-by: jongwooo jongwooo.han@gmail.com

Description

This adds a workflow to check the contents of the checked-in dist/index.js against the expected version.

See actions/upload-artifact#227 for background and rationale.

Signed-off-by: jongwooo <jongwooo.han@gmail.com>
@crazy-max
Copy link
Member

This is already checked in our Dockerfile:

FROM build AS build-validate
RUN --mount=type=bind,target=.,rw <<EOT
set -e
git add -A
cp -rf /out/* .
if [ -n "$(git status --porcelain -- dist)" ]; then
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'
git status --porcelain -- dist
exit 1
fi
EOT

This stage runs through the build-validate bake target:

target "build-validate" {
dockerfile = "dev.Dockerfile"
target = "build-validate"
output = ["type=cacheonly"]
}
which is part of the validate group:
group "validate" {
targets = ["lint", "build-validate", "vendor-validate"]
}

validate runs on ci here:

targets: validate

@crazy-max crazy-max closed this Dec 19, 2022
@jongwooo jongwooo deleted the chore/add-check-dist-workflow branch December 19, 2022 20:28
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