Skip to content

Commit

Permalink
Push docker images to github when we release
Browse files Browse the repository at this point in the history
  • Loading branch information
stew committed Jan 10, 2024
1 parent 014b3fc commit 1c674e2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ jobs:
unzip -d /tmp/ucm/ui /tmp/unisonLocal.zip
tar -c -z -f ucm-linux.tar.gz -C /tmp/ucm .
- name: build and push docker container
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"

- name: Log in to docker registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Push docker image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=${{inputs.version}}
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Upload linux artifact
uses: actions/upload-artifact@v2
with:
Expand Down
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM debian:stable

RUN adduser --home /unison --disabled-password unison

RUN apt-get update && \
apt-get install -y git libncurses5 less locales fzf && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8


COPY /tmp/ucm/ucm /usr/local/bin/ucm
COPY /tmp/ucm/ui /usr/local/share/ucm

ENV UCM_WEB_UI=/usr/local/share/ucm
ENV UCM_PORT=8080
ENV UCM_TOKEN=pub

RUN chmod 555 /usr/local/bin/ucm

EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/ucm"]
CMD ["--codebase","/unison"]

0 comments on commit 1c674e2

Please sign in to comment.