forked from muayyad-alsadi/pyredis-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.5 KB
/
build.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
43
44
45
46
47
48
name: Docker Build and Push
on:
push:
tags:
- 'v*.*.*'
jobs:
build_and_push:
name: 🐋 Build and push
runs-on: ubuntu-latest
steps:
- name: 📫 Checkout
uses: actions/[email protected]
- name: 💉 Inject slug/short variables
uses: rlespinasse/[email protected]
with:
short-length: 8
- name: 🏷️ Set up tags
id: meta
uses: docker/[email protected]
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/younited/pyredis-dump
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: ⚙️ Set up QEMU
uses: docker/[email protected]
- name: ⚙️ Set up Docker Buildx
uses: docker/[email protected]
- name: 🔑 Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: 🐋 Build and push
uses: docker/[email protected]
with:
file: ./Dockerfile
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}