Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 91758903e9 | |||
| e1d84f2d75 | |||
| 10f6a5ec32 | |||
| e4e60c1023 |
51
.github/workflows/docker-publish.yml
vendored
Normal file
51
.github/workflows/docker-publish.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
name: Docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
# Publish `master` as Docker `latest` image.
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
# Publish `v1.2.3` tags as releases.
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
# Run tests for any PRs.
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Run tests.
|
||||||
|
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
if [ -f docker-compose.test.yml ]; then
|
||||||
|
docker-compose --file docker-compose.test.yml build
|
||||||
|
docker-compose --file docker-compose.test.yml run sut
|
||||||
|
else
|
||||||
|
docker build . --file Dockerfile
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Push image to GitHub Packages.
|
||||||
|
# See also https://docs.docker.com/docker-hub/builds/
|
||||||
|
push:
|
||||||
|
# Ensure test job passes before pushing image.
|
||||||
|
needs: test
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: docker/build-push-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
repository: snegov/seafile-client
|
||||||
|
tag_with_ref: true
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM python:3-slim
|
FROM python:3-slim
|
||||||
|
|
||||||
RUN apt-get update && apt-get install gnupg -y
|
RUN apt-get update && apt-get install gnupg -y && rm -rf /var/lib/apt/lists/*
|
||||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 && \
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 && \
|
||||||
echo deb http://deb.seadrive.org buster main | tee /etc/apt/sources.list.d/seafile.list && \
|
echo deb http://deb.seadrive.org buster main | tee /etc/apt/sources.list.d/seafile.list && \
|
||||||
apt-get update -y && \
|
apt-get update -y && \
|
||||||
|
|||||||
Reference in New Issue
Block a user