Skip to content

Commit 6ab4ca6

Browse files
committed
ci(gh-actions): creates a docker image on tag only
Signed-off-by: Pierre 'McFly' Marty <[email protected]>
1 parent 717db17 commit 6ab4ca6

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

.github/workflows/pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: pr
33
on:
44
pull_request:
55
branches:
6-
- main
6+
- dev
7+
- hotfixes
78
- master
89
merge_group:
910
workflow_dispatch:

.github/workflows/publish-matrix-invite.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14-
- name: date
15-
id: date
16-
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
14+
- name: Extract tag name
15+
id: tag
16+
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
1717
- name: Get all src files that have changed
1818
id: changed-files
1919
uses: tj-actions/changed-files@v46
@@ -30,5 +30,4 @@ jobs:
3030
workdir: "${{ github.workspace }}/packages/matrix-invite"
3131
context: .
3232
buildoptions: "-t linagora/matrix-invite -f Dockerfile"
33-
tags: "latest,${{ steps.date.outputs.date }}"
34-
33+
tags: "latest,${{ steps.tag.outputs.tag }}"

.github/workflows/publish-tom-federated-identity-service.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14-
- name: date
15-
id: date
16-
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
14+
- name: Extract tag name
15+
id: tag
16+
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
1717
- name: Get all src files that have changed
1818
id: changed-files
1919
uses: tj-actions/changed-files@v46
@@ -44,4 +44,4 @@ jobs:
4444
push: true
4545
tags: |
4646
linagora/tom-federated-identity-service:latest
47-
linagora/tom-federated-identity-service:${{ steps.date.outputs.date }}
47+
linagora/tom-federated-identity-service:${{ steps.tag.outputs.tag }}

.github/workflows/publish-tom-server.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
publish:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: date
14-
id: date
15-
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
13+
- name: Extract tag name
14+
id: tag
15+
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
1616
- uses: actions/checkout@v3
1717
- name: Get all src files that have changed
1818
id: changed-files
@@ -44,4 +44,4 @@ jobs:
4444
push: true
4545
tags: |
4646
linagora/tom-server:latest
47-
linagora/tom-server:${{ steps.date.outputs.date }}
47+
linagora/tom-server:${{ steps.tag.outputs.tag }}

.github/workflows/push.yml renamed to .github/workflows/push-tags.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches:
4-
- main
5-
- master
3+
tags:
4+
- "*"
5+
workflow_dispatch:
66

77
jobs:
88
test:

0 commit comments

Comments
 (0)