-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (59 loc) · 1.54 KB
/
delivery.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
name: Delivery
on:
push:
branches:
- main
paths:
- 'image/**'
env:
IMAGE_NAME: alvarofpp/s2client
jobs:
build-and-push:
runs-on: ubuntu-latest
name: Build and push [${{ matrix.version }}]
strategy:
matrix:
version:
- "3.16.1"
- "3.17"
- "4.0.2"
- "4.1.2"
- "4.6"
- "4.6.1"
- "4.6.2"
- "4.7"
- "4.7.1"
- "4.8.2"
- "4.8.3"
- "4.8.4"
- "4.8.6"
- "4.9.0"
- "4.9.1"
- "4.9.2"
- "4.9.3"
- "4.10"
steps:
- uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
run: docker build --build-arg VERSION="${VERSION}" image/. -t ${DOCKER_IMAGE}
env:
VERSION: ${{ matrix.version }}
DOCKER_IMAGE: ${{ env.IMAGE_NAME }}:${{ matrix.version }}
- name: Push
run: docker push ${DOCKER_IMAGE}
env:
DOCKER_IMAGE: ${{ env.IMAGE_NAME }}:${{ matrix.version }}
- name: Build and push latest
if: ${{ matrix.version == 4.10 }}
run: |
docker tag ${DOCKER_IMAGE} ${DOCKER_IMAGE_LATEST}
docker push ${DOCKER_IMAGE_LATEST}
env:
DOCKER_IMAGE: ${{ env.IMAGE_NAME }}:${{ matrix.version }}
DOCKER_IMAGE_LATEST: ${{ env.IMAGE_NAME }}:latest