-
Notifications
You must be signed in to change notification settings - Fork 78
36 lines (33 loc) · 1.01 KB
/
publish-docker.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
name: Publish Docker Images
on:
push:
branches:
- master
tags:
- v*
workflow_dispatch:
jobs:
build-and-publish:
name: Build and publish Docker images to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and Publish to Registry
if: "!(startsWith(github.ref, 'refs/tags/'))"
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: matthewfeickert/docker-python3-ubuntu
dockerfile: Dockerfile
tags: latest,3.10.5
- name: Build and Publish to Registry with Release Tag
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: matthewfeickert/docker-python3-ubuntu
dockerfile: Dockerfile
tags: latest,latest-stable
tag_with_ref: true