-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.08 KB
/
build-image.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
name: "Build image and upload to ghcr.io"
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: "Docker: Setup Buildx"
uses: docker/setup-buildx-action@v2
- name: "Docker: Login to GitHub Container Registry"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: "Docker: Metadata"
id: docker-meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/LiamSho/pg-auto-backup
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=pr
type=sha
- name: "Docker: Build and Push Image"
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}