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

Fix binary permissions as part of Github actions #224

Merged
merged 2 commits into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ jobs:
with:
name: hegel

# The upload/download actions do not preserve permissions so they need explicitly setting.
- name: Fix binary permissions
run: chmod +x hegel-linux-*

- name: Generate image tags
uses: docker/metadata-action@v4
id: meta
Expand Down
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ RUN apk add --update --upgrade --no-cache ca-certificates && \

COPY ./hegel-$TARGETOS-$TARGETARCH /usr/bin/hegel

# Github's artifact upload action doesn't preserve permissions. While this is a Github specific
# problem, there's no succinct way to fix it in the actions as we build for multiple platforms.
# For now, we'll suffer the extra layer and just chmod the binary.
RUN chmod +x /usr/bin/hegel

# Switching to the tinkerbell user should be done as late as possible so we still use root to
# perform the other commands.
USER tinkerbell
Expand Down