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

added release workflow #319

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

added release workflow #319

wants to merge 19 commits into from

Conversation

unfor19
Copy link

@unfor19 unfor19 commented Jan 12, 2024

  • Added a Dockerfile to build Linux artifacts for arm64 and amd64
  • Added a workflow to release Linux binaries as GitHub Release Assets

@emcrisostomo Feel free to decline; I just thought it might be helpful for others to pull the binaries instead of building it locally. Thank you very much for this tool; I'm using it here unfor19/tfcoding, and it works perfectly.

Example of how to consume it in a Dockerfile:

ARG FSWATCH_VERSION=1.17.1
ARG GITHUB_REPOSITORY=unfor19/fswatch

FROM alpine:3.19 as download
ARG FSWATCH_VERSION
ARG GITHUB_REPOSITORY

ENV OS_ARCH="amd64"
WORKDIR /downloads/fswatch
RUN if [ "$(uname -m)" = "aarch64" ]; then export OS_ARCH=arm64; fi && \
    wget -O fswatch.tar.gz "https://github.com/${GITHUB_REPOSITORY}/releases/download/${FSWATCH_VERSION}/fswatch-${FSWATCH_VERSION}-linux-alpine-${OS_ARCH}.tar.gz" && \
    ls -lah fswatch.tar.gz && \
    tar -xzf fswatch.tar.gz && chmod +x fswatch && rm fswatch.tar.gz


FROM alpine:3.19 as app
# Required for runtime
RUN apk add --no-cache libstdc++ gettext
COPY --from=download /downloads/fswatch/*.so* /usr/local/lib/
COPY --from=download /downloads/fswatch/fswatch /usr/local/bin/fswatch
ENTRYPOINT ["fswatch"]
CMD [ "--help" ]
  1. Build the Docker image:
    docker build -t fswatch .
  2. Run a container and test fswatch
    docker run --rm -it fswatch

If you need any help when it comes to DevOps, let me know, I would love to assist in this project.

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.

None yet

1 participant