-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (45 loc) · 1.65 KB
/
publish.yml
File metadata and controls
50 lines (45 loc) · 1.65 KB
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
name: Publish Docker image
permissions:
contents: read
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker hub
runs-on: ubuntu-latest
environment:
name: Build Docker images
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_REPOSITORY_LOGIN }}
password: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push image
run: make docker-build
if: startsWith(github.ref, 'refs/tags/5.2/')
env:
DOCKER_BUILDKIT: 1
PLATFORM: "linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x"
IMAGE_TAG: "docker.io/botsudo/phpmyadmin-snapshots:5.2-snapshot"
VERSION_RANGE: "5.2"
ACTION: push
- name: Build and push image
run: make docker-build
if: startsWith(github.ref, 'refs/tags/6.0/')
env:
DOCKER_BUILDKIT: 1
PLATFORM: "linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x"
IMAGE_TAG: "docker.io/botsudo/phpmyadmin-snapshots:6.0-snapshot"
VERSION_RANGE: "6.0"
ACTION: push