-
Notifications
You must be signed in to change notification settings - Fork 18
90 lines (80 loc) · 2.51 KB
/
publish_feature.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Publish Feature Branch
on:
push:
branches:
- main
- feature-**
- release/*
jobs:
setup:
name: Setup jobs
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
backend:
- "tdrive/backend/node/**"
- "tdrive/docker/tdrive-node/Dockerfile"
frontend:
- "tdrive/frontend/**"
- "tdrive/docker/tdrive-frontend/**"
onlyoffice-connector:
- "tdrive/connectors/onlyoffice-connector/**"
- "tdrive/docker/onlyoffice-connector/Dockerfile"
ldap-sync:
- "tdrive/backend/utils/ldap-sync/**"
- "tdrive/docker/tdrive-ldap-sync/Dockerfile"
nextcloud-migration:
- "tdrive/backend/utils/nextcloud-migration/**"
- "tdrive/docker/tdrive-nextcloud-migration/Dockerfile"
publish-feature:
runs-on: ubuntu-latest
strategy:
matrix:
targets: ${{ fromJSON(needs.setup.outputs.targets) }}
fail-fast: false
needs:
- setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Echo
run: echo Publish images with tag ${{ github.head_ref || github.ref_name }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
tags: |
${{ github.head_ref || github.ref_name }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to Linagora Registry
uses: docker/login-action@v3
with:
registry: docker-registry.linagora.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/bake-action@v4
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file-annotations }}
${{ steps.meta.outputs.bake-file }}
push: true
targets: ${{ matrix.targets }}
set: |
_common.cache-to=type=gha,mode=max
_common.cache-from=type=gha