Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
66 changes: 0 additions & 66 deletions .github/workflows/main.yaml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Filebrowser docker image

on:
push:
branches:
- '**'
tags: [ 'v*' ]
pull_request:
branches:
- 'master'

jobs:
generate-filebrowser-image:
runs-on: ubuntu-latest
steps:
- name: Determine Build Environment
id: set-env
run: |
if ${{ github.event_name == 'push' && github.ref_name != 'master' }}; then
echo "DEV environment"
echo "ENV_VERSION=v10-dev" >> $GITHUB_ENV
elif ${{ github.event_name == 'pull_request' && github.base_ref == 'master' }}; then
echo "QA environment"
echo "ENV_VERSION=v10-qa" >> $GITHUB_ENV
elif ${{ github.event_name == 'push' && github.ref_name == 'master'}}; then
echo "RC environment"
echo "ENV_VERSION=v10-rc" >> $GITHUB_ENV
elif ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}; then
echo "PROD environment"
echo "ENV_VERSION=v10" >> $GITHUB_ENV
fi
- name: Check out code into the right branch
uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build frontend
run: make build-frontend
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ^1.20
id: go
- name: Build Binary
run: go build -o "filebrowser" -v .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: utmstack
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push the Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/utmstack/filebrowser/filebrowser:${{ env.ENV_VERSION }}

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ RUN apt install -y ca-certificates sendmail curl
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost:9091/health || exit 1

VOLUME /srv

COPY .docker.json /.filebrowser.json
COPY filebrowser /filebrowser
COPY run.sh /run.sh

RUN chmod +x /run.sh

ENTRYPOINT [ "/run.sh" ]