-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (88 loc) · 3.06 KB
/
publish.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
91
92
93
94
95
96
name: Bump version
on:
push:
branches:
- develop
jobs:
tag:
name: bump tags
outputs:
part: ${{ steps.bump_tag.outputs.part }}
tag: ${{ steps.bump_tag.outputs.tag }}
new_tag: ${{ steps.bump_tag.outputs.new_tag }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Bump version and push tag
id: bump_tag
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
push_to_registry:
needs: tag
if: needs.tag.outputs.part != ''
name: Push Docker image to Github Container registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
submodules: true
- name: Log in to the Github Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/nbisweden/mimir
- name: Build and push client
uses: docker/build-push-action@v3
with:
context: ./mimir-ui
file: ./mimir-ui/Dockerfile
push: true
tags: |
ghcr.io/nbisweden/mimir-client:${{ needs.tag.outputs.tag }}
ghcr.io/nbisweden/mimir-client:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
org.opencontainers.image.revision=${{ github.sha }}
- name: Build and push backend-wsgi-server
uses: docker/build-push-action@v3
with:
context: ./mimir-server
file: ./mimir-server/Dockerfile
target: wsgi-server
push: true
tags: |
ghcr.io/nbisweden/mimir-backend-wsgi-server:${{ needs.tag.outputs.tag }}
ghcr.io/nbisweden/mimir-backend-wsgi-server:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
org.opencontainers.image.revision=${{ github.sha }}
- name: Build and push backend-web-server
uses: docker/build-push-action@v3
with:
context: ./mimir-server
file: ./mimir-server/Dockerfile
push: true
tags: |
ghcr.io/nbisweden/mimir-backend-web-server:${{ needs.tag.outputs.tag }}
ghcr.io/nbisweden/mimir-backend-web-server:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
org.opencontainers.image.revision=${{ github.sha }}