-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.1 KB
/
dockerpublish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Docker
on: [push, 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/docker-compose.test.yml ]; then
docker-compose --file docker/docker-compose.test.yml build
docker-compose --file docker/docker-compose.test.yml run sut
else
docker build --file docker/Dockerfile .
fi
# Push image to GitHub Packages.
push:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/[email protected]
with:
repository: atgardner/osmexport/osmexport
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
dockerfile: docker/Dockerfile
tag_with_ref: true
tag_with_sha: true
add_git_labels: true