-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.53 KB
/
docker-release-tag.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Docker Release
on:
push:
tags:
- "*"
jobs:
push:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
strategy:
matrix:
python:
- 3.7-alpine
- 3.8-alpine
- 3.9-alpine
name: Tag Release for Python ${{ matrix.python }}
steps:
- uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/[email protected]
with:
images: quay.io/renokigames/python-game-terrain
tags: |
type=semver,pattern=${{ matrix.python }}-{{version}}
type=semver,pattern=${{ matrix.python }}-{{major}}
type=semver,pattern=${{ matrix.python }}-{{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Compute GitHub tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
- name: Build and push
id: docker
uses: docker/build-push-action@v2
with:
push: true
context: .
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
PYTHON_VERSION=${{ matrix.python }}