Update github workflow

This commit is contained in:
Maks Snegov 2020-06-04 22:29:20 +03:00
parent 91758903e9
commit e4268c0b21

View File

@ -2,20 +2,17 @@ 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:
env:
IMAGE_NAME: seafile-client
jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest
@ -31,10 +28,7 @@ jobs:
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
@ -47,5 +41,5 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: snegov/seafile-client
repository: ${{ secrets.DOCKER_USERNAME }}/$IMAGE_NAME
tag_with_ref: true