Update github workflow
This commit is contained in:
parent
91758903e9
commit
e4268c0b21
14
.github/workflows/docker-publish.yml
vendored
14
.github/workflows/docker-publish.yml
vendored
@ -2,20 +2,17 @@ name: Docker
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# Publish `master` as Docker `latest` image.
|
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
# Publish `v1.2.3` tags as releases.
|
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
# Run tests for any PRs.
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: seafile-client
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Run tests.
|
|
||||||
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@ -31,10 +28,7 @@ jobs:
|
|||||||
docker build . --file Dockerfile
|
docker build . --file Dockerfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Push image to GitHub Packages.
|
|
||||||
# See also https://docs.docker.com/docker-hub/builds/
|
|
||||||
push:
|
push:
|
||||||
# Ensure test job passes before pushing image.
|
|
||||||
needs: test
|
needs: test
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -47,5 +41,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
repository: snegov/seafile-client
|
repository: ${{ secrets.DOCKER_USERNAME }}/$IMAGE_NAME
|
||||||
tag_with_ref: true
|
tag_with_ref: true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user